Skip to content

Commit 1b83912

Browse files
filzrevp-kostov
authored andcommitted
fix: NullReferenceException occurred when both include and exclude are null (dotnet#9786)
fix: NullReferenceException occurred when both include and exclude were null
1 parent e99333b commit 1b83912

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Docfx.Dotnet/Filters/ConfigFilterRuleItemUnion.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ public ConfigFilterRuleItem Rule
5454
}
5555

5656
// If kind is not specified for exclude. Set `ExtendedSymbolKind.Type` as default kind.
57-
Exclude.Kind ??= ExtendedSymbolKind.Type | ExtendedSymbolKind.Member;
57+
if (Exclude != null)
58+
{
59+
Exclude.Kind ??= ExtendedSymbolKind.Type | ExtendedSymbolKind.Member;
60+
}
5861

5962
return Exclude;
6063
}

0 commit comments

Comments
 (0)