Skip to content

Commit cd08819

Browse files
committed
Fix null handling in signature provider
1 parent c54309a commit cd08819

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/App/wwwroot/js/BlazorMonacoInterop.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,12 @@ export function registerSignatureHelpProvider(language, hoverProvider) {
174174
throw new Error('busy');
175175
}
176176

177-
if (result === '') {
177+
const parsed = JSON.parse(result);
178+
179+
if (parsed === null) {
178180
return null;
179181
}
180182

181-
const parsed = JSON.parse(result);
182183
return {
183184
value: parsed,
184185
dispose: () => { }, // Currently not used.

src/Compiler/LanguageServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ static string addPrefix(string? prefix, string nested)
528528
{
529529
if (!TryGetDocument(modelUri, out var document))
530530
{
531-
return "";
531+
return "null";
532532
}
533533

534534
var sw = Stopwatch.StartNew();

0 commit comments

Comments
 (0)