Handle null values for comment data
This commit is contained in:
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[]
|
||||
|
||||
Reference in New Issue
Block a user