do not use ScriptVersionCache for closed files (#12777)

This commit is contained in:
Vladimir Matveev authored and GitHub committed 2016-12-08 16:17:42 -08:00
1 parent 9dd769dc3c
commit 7da3383504
10 files changed
+304 -77

No files matched your search

+3 -2
View File
@@ -438,8 +438,9 @@ namespace ts.server {
}
}
getChangeRange(oldSnapshot: ts.IScriptSnapshot): ts.TextChangeRange {
const oldSnap = <LineIndexSnapshot>oldSnapshot;
return this.getTextChangeRangeSinceVersion(oldSnap.version);
if (oldSnapshot instanceof LineIndexSnapshot) {
return this.getTextChangeRangeSinceVersion(oldSnapshot.version);
}
}
}