diff options
| author | Alexander Early <alexander.early@gmail.com> | 2016-07-07 17:16:07 -0700 |
|---|---|---|
| committer | Alexander Early <alexander.early@gmail.com> | 2016-07-07 17:16:07 -0700 |
| commit | f21e7dbeefe37d32d592cb80992def758c023629 (patch) | |
| tree | 6b1c4780d6755c50d74e9a574058ad9a0351776c | |
| parent | ef05d55e1bbe1a8c823eaa4d5e0de6f5818ff27e (diff) | |
| download | async-queue-opts.tar.gz | |
use each instead of somequeue-opts
| -rw-r--r-- | lib/internal/queue.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/internal/queue.js b/lib/internal/queue.js index dcf376e..e3887cb 100644 --- a/lib/internal/queue.js +++ b/lib/internal/queue.js @@ -1,5 +1,4 @@ import arrayEach from 'lodash/_arrayEach'; -import arraySome from 'lodash/_arraySome'; import isArray from 'lodash/isArray'; import noop from 'lodash/noop'; import rest from 'lodash/rest'; @@ -51,10 +50,10 @@ export default function queue(worker, concurrency, payload) { workers -= 1; arrayEach(tasks, function (task) { - arraySome(workersList, function (worker, index) { + arrayEach(workersList, function (worker, index) { if (worker === task) { workersList.splice(index, 1); - return true; + return false; } }); |
