mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Fix a crash in getValidSourceFile when the text content is empty
This commit is contained in:
parent
778ace10c0
commit
3237250330
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue