Handle null values for comment data
This commit is contained in:
parent
0619fe3d21
commit
fdd97fa9b3
Binary file not shown.
Binary file not shown.
|
@ -123,9 +123,15 @@ namespace UpsilonLanguageServer.Services
|
|||
if (variableSymbol.VariableSymbol is TableVariableSymbol tableSymbol)
|
||||
{
|
||||
return new CompletionList(
|
||||
tableSymbol.Variables.Select(x => new CompletionItem(x.Key,
|
||||
CompletionItemKind.Variable, x.Value.Type.ToString(),
|
||||
$"\n\n{string.Join(" \n", x.Value.CommentValue)}")));
|
||||
tableSymbol.Variables.Select(x =>
|
||||
{
|
||||
var (key, value) = x;
|
||||
return new CompletionItem(key,
|
||||
CompletionItemKind.Variable, value.Type.ToString(),
|
||||
x.Value.CommentValue == null
|
||||
? ""
|
||||
: $"\n\n{string.Join(" \n", value.CommentValue)}");
|
||||
}));
|
||||
}
|
||||
return new CompletionList(
|
||||
new[]
|
||||
|
|
Loading…
Reference in New Issue