Skip to content

Commit

Permalink
fix: waitForRequestIdle locked (#17982)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Sep 1, 2024
1 parent 943ece1 commit ad13760
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ad13760

Please sign in to comment.