Skip to content

Commit

Permalink
Update promise-limit.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Rain120 authored Mar 22, 2022
1 parent 57417f5 commit 0d32c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion promise-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function pLimit(arr, limit, callback) {
const item = arr[index++];

const p = Promise.resolve().then(() => {
callback && callback(item, arr);
return callback && callback(item, arr);
});
promises.push(p);

Expand Down

0 comments on commit 0d32c25

Please sign in to comment.