Преглед изворни кода

Fix a crash in getValidSourceFile when the text content is empty

Orta Therox пре 5 година
родитељ
комит
3237250330
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/tsWorker.ts

+ 1 - 1
src/tsWorker.ts

@@ -97,7 +97,7 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, monaco.language
 
 
 	getScriptSnapshot(fileName: string): ts.IScriptSnapshot | undefined {
 	getScriptSnapshot(fileName: string): ts.IScriptSnapshot | undefined {
 		const text = this._getScriptText(fileName);
 		const text = this._getScriptText(fileName);
-		if (!text) {
+		if (text === undefined) {
 			return;
 			return;
 		}
 		}