fix: editor should not setModelMarkers when allDiagnostics is empty

This commit is contained in:
xuanji.w 2023-08-31 16:10:47 +08:00
parent c4fa782fc2
commit b61ed73327

View file

@ -306,7 +306,7 @@ export class DiagnosticsAdapter extends Adapter {
const allDiagnostics = await Promise.all(promises); const allDiagnostics = await Promise.all(promises);
if (!allDiagnostics || model.isDisposed()) { if (!allDiagnostics.length || model.isDisposed()) {
// model was disposed in the meantime // model was disposed in the meantime
return; return;
} }