Преглед на файлове

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 {
 		const text = this._getScriptText(fileName);
-		if (!text) {
+		if (text === undefined) {
 			return;
 		}