Skip to content

Commit 7e49390

Browse files
committed
Should also check if there are no external projects before skipping scheduling
Fixes failing tests
1 parent 0820519 commit 7e49390

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
@@ -923,7 +923,8 @@ namespace ts.server {
923923

924924
/*@internal*/
925925
delayEnsureProjectForOpenFiles() {
926-
if (!this.openFiles.size) return;
926+
// If no open files or no external project, do not schedule
927+
if (!this.openFiles.size && !this.externalProjects.length && !this.externalProjectToConfiguredProjectMap.size) return;
927928
this.pendingEnsureProjectForOpenFiles = true;
928929
this.throttledOperations.schedule("*ensureProjectForOpenFiles*", /*delay*/ 2500, () => {
929930
if (this.pendingProjectUpdates.size !== 0) {

0 commit comments

Comments
 (0)