Skip to content

Commit

Permalink
remove early execution
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunpersad committed Jan 9, 2022
1 parent 271c07a commit 307f729
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "throttled-queue",
"version": "2.0.2",
"version": "2.0.3",
"description": "Throttles arbitrary code to execute a maximum number of times per interval. Best for making throttled API requests.",
"main": "dist/throttledQueue.js",
"directories": {
Expand Down
3 changes: 0 additions & 3 deletions src/throttledQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ function throttledQueue(
if (!timeout) {
timeout = setTimeout(dequeue, interval);
}
if (queue.length <= maxRequestsPerInterval) {
dequeue();
}
},
);
}
Expand Down

0 comments on commit 307f729

Please sign in to comment.