From b61ed73327a24b516cf990ba8a1654bbd9a5321a Mon Sep 17 00:00:00 2001 From: "xuanji.w" Date: Thu, 31 Aug 2023 16:10:47 +0800 Subject: [PATCH] fix: editor should not setModelMarkers when allDiagnostics is empty --- src/language/typescript/languageFeatures.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/language/typescript/languageFeatures.ts b/src/language/typescript/languageFeatures.ts index ca11141736..8aaeb6ed08 100644 --- a/src/language/typescript/languageFeatures.ts +++ b/src/language/typescript/languageFeatures.ts @@ -306,7 +306,7 @@ export class DiagnosticsAdapter extends Adapter { const allDiagnostics = await Promise.all(promises); - if (!allDiagnostics || model.isDisposed()) { + if (!allDiagnostics.length || model.isDisposed()) { // model was disposed in the meantime return; }