Skip to content

Commit f431c82

Browse files
author
Zhengbo Li
committed
Merge pull request microsoft#5336 from zhengbli/fixWatcherIssue
Issue fix for config file watcher callback
2 parents 8e492a4 + 7ecf90e commit f431c82

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/server/editorServices.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,11 +1268,15 @@ namespace ts.server {
12681268
if (info.isOpen) {
12691269
if (this.openFileRoots.indexOf(info) >= 0) {
12701270
this.openFileRoots = copyListRemovingItem(info, this.openFileRoots);
1271+
if (info.defaultProject && !info.defaultProject.isConfiguredProject()) {
1272+
this.removeProject(info.defaultProject);
1273+
}
12711274
}
12721275
if (this.openFilesReferenced.indexOf(info) >= 0) {
12731276
this.openFilesReferenced = copyListRemovingItem(info, this.openFilesReferenced);
12741277
}
12751278
this.openFileRootsConfigured.push(info);
1279+
info.defaultProject = project;
12761280
}
12771281
}
12781282
project.addRoot(info);

0 commit comments

Comments
 (0)