Merge pull request #5336 from zhengbli/fixWatcherIssue

Issue fix for config file watcher callback
This commit is contained in:
Zhengbo Li
2015-10-23 11:47:54 -07:00

View File

@@ -1268,11 +1268,15 @@ namespace ts.server {
if (info.isOpen) {
if (this.openFileRoots.indexOf(info) >= 0) {
this.openFileRoots = copyListRemovingItem(info, this.openFileRoots);
if (info.defaultProject && !info.defaultProject.isConfiguredProject()) {
this.removeProject(info.defaultProject);
}
}
if (this.openFilesReferenced.indexOf(info) >= 0) {
this.openFilesReferenced = copyListRemovingItem(info, this.openFilesReferenced);
}
this.openFileRootsConfigured.push(info);
info.defaultProject = project;
}
}
project.addRoot(info);