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

This commit is contained in:
Andy authored and GitHub committed 2018-05-15 13:55:26 -07:00
1 parent 86dce41ec0
commit cbbe34b35e
6 files changed
+25 -8

No files matched your search

+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);