Skip to content

Commit

Permalink
Return empty string when array empty
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach committed Nov 8, 2019
1 parent 954491a commit eac1954
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PublicApiGenerator/ApiGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public static string GeneratePublicApi(this Assembly assembly, ApiGeneratorOptio
/// <returns>The API output.</returns>
public static string GeneratePublicApi(this Type[] types, ApiGeneratorOptions? options = null)
{
if (types.Length == 0)
{
return string.Empty;
}
(options ??= new ApiGeneratorOptions()).IncludeTypes = types;
return types[0].Assembly.GeneratePublicApi(options);
}
Expand Down

0 comments on commit eac1954

Please sign in to comment.