Fix a crash in getValidSourceFile when the text content is empty

pull/2748/head
Orta Therox 5 years ago
parent 778ace10c0
commit 3237250330

@ -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;
} }

Loading…
Cancel
Save