Explorar el Código

Fixes microsoft/monaco-editor#2172

Alexandru Dima hace 4 años
padre
commit
803466d050
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/languageFeatures.ts

+ 4 - 0
src/languageFeatures.ts

@@ -926,6 +926,10 @@ export class FormatAdapter
 			column: range.endColumn
 		});
 		const worker = await this._worker(resource);
+		if (model.isDisposed()) {
+			return;
+		}
+
 		const edits = await worker.getFormattingEditsForRange(
 			resource.toString(),
 			startOffset,