Skip to content

Commit

Permalink
fix: NullReferenceException occurred when both include and exclude ar…
Browse files Browse the repository at this point in the history
…e null (dotnet#9786)

fix: NullReferenceException occurred when both include and exclude were null
  • Loading branch information
filzrev authored and p-kostov committed Jun 28, 2024
1 parent e99333b commit 1b83912
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Docfx.Dotnet/Filters/ConfigFilterRuleItemUnion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public ConfigFilterRuleItem Rule
}

// If kind is not specified for exclude. Set `ExtendedSymbolKind.Type` as default kind.
Exclude.Kind ??= ExtendedSymbolKind.Type | ExtendedSymbolKind.Member;
if (Exclude != null)
{
Exclude.Kind ??= ExtendedSymbolKind.Type | ExtendedSymbolKind.Member;
}

return Exclude;
}
Expand Down

0 comments on commit 1b83912

Please sign in to comment.