Skip to content

Commit

Permalink
Fix a bug in the collecting of asynchronous lint results
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Nov 28, 2024
1 parent 1fcc3e1 commit 124f997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function batchResults<T>(promises: readonly Promise<T>[], sink: (values: T[]) =>
collected.push(value)
clearTimeout(timeout)
if (collected.length == promises.length) sink(collected)
else setTimeout(() => sink(collected), 200)
else timeout = setTimeout(() => sink(collected), 200)
}, error)
}

Expand Down

0 comments on commit 124f997

Please sign in to comment.