Skip to content

Commit 85872ea

Browse files
sheetalkamatDanielRosenwasser
authored andcommitted
The assert that cached value of config file existance is always correct, might not be true if file watcher is not invoked before creating configured project
1 parent d63cc5f commit 85872ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/editorServices.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,8 @@ namespace ts.server {
12341234
private setConfigFileExistenceByNewConfiguredProject(project: ConfiguredProject) {
12351235
const configFileExistenceInfo = this.getConfigFileExistenceInfo(project);
12361236
if (configFileExistenceInfo) {
1237-
Debug.assert(configFileExistenceInfo.exists);
1237+
// The existance might not be set if the file watcher is not invoked by the time config project is created by external project
1238+
configFileExistenceInfo.exists = true;
12381239
// close existing watcher
12391240
if (configFileExistenceInfo.configFileWatcherForRootOfInferredProject) {
12401241
const configFileName = project.getConfigFilePath();

0 commit comments

Comments
 (0)