Skip to content

Commit

Permalink
The assert that cached value of config file existance is always corre…
Browse files Browse the repository at this point in the history
…ct, might not be true if file watcher is not invoked before creating configured project
  • Loading branch information
sheetalkamat authored and DanielRosenwasser committed Jan 3, 2019
1 parent d63cc5f commit 85872ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/editorServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,8 @@ namespace ts.server {
private setConfigFileExistenceByNewConfiguredProject(project: ConfiguredProject) {
const configFileExistenceInfo = this.getConfigFileExistenceInfo(project);
if (configFileExistenceInfo) {
Debug.assert(configFileExistenceInfo.exists);
// The existance might not be set if the file watcher is not invoked by the time config project is created by external project
configFileExistenceInfo.exists = true;
// close existing watcher
if (configFileExistenceInfo.configFileWatcherForRootOfInferredProject) {
const configFileName = project.getConfigFilePath();
Expand Down

0 comments on commit 85872ea

Please sign in to comment.