Fix conversion of TextChanges to FileCodeEdits for new file (#24126)

This commit is contained in:
Andy
2018-05-15 13:55:26 -07:00
committed by GitHub
parent 86dce41ec0
commit cbbe34b35e
6 changed files with 25 additions and 8 deletions
+1 -1
View File
@@ -964,7 +964,7 @@ namespace ts.server {
return this.missingFilesMap && this.missingFilesMap.has(path);
}
getScriptInfoForNormalizedPath(fileName: NormalizedPath) {
getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined {
const scriptInfo = this.projectService.getScriptInfoForPath(this.toPath(fileName));
if (scriptInfo && !scriptInfo.isAttached(this)) {
return Errors.ThrowProjectDoesNotContainDocument(fileName, this);