do not use ScriptVersionCache for closed files (#12777)

This commit is contained in:
Vladimir Matveev
2016-12-08 16:17:42 -08:00
committed by GitHub
parent 9dd769dc3c
commit 7da3383504
10 changed files with 304 additions and 77 deletions
+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);
}
}
}