Skip to content

Commit

Permalink
fix: NRE related to #8653 (#8658)
Browse files Browse the repository at this point in the history
  • Loading branch information
VaclavElias authored Apr 20, 2023
1 parent 7831dfa commit bdcf8fd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Microsoft.DocAsCode.Dotnet/SymbolFormatter.Syntax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,16 @@ private ISymbol HidePropertyAccessorIfNeeded(ISymbol symbol)

private ImmutableArray<SymbolDisplayPart> GetDisplayParts(ISymbol symbol, SymbolDisplayFormat format)
{
return Language is SyntaxLanguage.VB
? VB.SymbolDisplay.ToDisplayParts(symbol, format)
: CS.SymbolDisplay.ToDisplayParts(symbol, format);
try
{
return Language is SyntaxLanguage.VB
? VB.SymbolDisplay.ToDisplayParts(symbol, format)
: CS.SymbolDisplay.ToDisplayParts(symbol, format);
}
catch
{
return ImmutableArray<SymbolDisplayPart>.Empty;
}
}
}
}

0 comments on commit bdcf8fd

Please sign in to comment.