diff options
Diffstat (limited to 'lib/auto.js')
-rw-r--r-- | lib/auto.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/auto.js b/lib/auto.js index 21fbb08..0e9d108 100644 --- a/lib/auto.js +++ b/lib/auto.js @@ -72,6 +72,7 @@ export default function (tasks, concurrency, callback) { }); safeResults[k] = args; hasError = true; + listeners = []; callback(err, safeResults); } @@ -106,7 +107,9 @@ export default function (tasks, concurrency, callback) { } function ready() { - return runningTasks < concurrency && !baseHas(results, k) && + return runningTasks < concurrency && + !baseHas(results, k) && + !hasError && arrayEvery(requires, function (x) { return baseHas(results, x); }); |