Reload the text from file if there is pending reload of the script info before determining to use SVC

Fixes #20806
This commit is contained in:
Sheetal Nandi 2018-02-23 12:10:24 -08:00
parent 4d6b53bae5
commit 08ab6eb42d

View File

@ -176,8 +176,13 @@ namespace ts.server {
return this.switchToScriptVersionCache();
}
// Else if the svc is uptodate with the text, we are good
return !this.pendingReloadFromDisk && this.svc;
// If there is pending reload from the disk then, reload the text
if (this.pendingReloadFromDisk) {
this.reloadWithFileText();
}
// At this point if svc is present its valid
return this.svc;
}
private getOrLoadText() {