From ad1376018a94b42540a8488d897cc520849e1228 Mon Sep 17 00:00:00 2001 From: patak <583075+patak-dev@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:23:56 +0200 Subject: [PATCH] fix: waitForRequestIdle locked (#17982) --- packages/vite/src/node/server/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 6a82b55a1d91d7..fa75408fafbaff 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1251,15 +1251,15 @@ function setupOnCrawlEnd(onCrawlEnd: () => void): CrawlEndFinder { if (ignoredId) { seenIds.add(ignoredId) markIdAsDone(ignoredId) + } else { + checkIfCrawlEndAfterTimeout() } return onCrawlEndPromiseWithResolvers.promise } function markIdAsDone(id: string): void { - if (registeredIds.has(id)) { - registeredIds.delete(id) - checkIfCrawlEndAfterTimeout() - } + registeredIds.delete(id) + checkIfCrawlEndAfterTimeout() } function checkIfCrawlEndAfterTimeout() {