diff options
author | Alexander Early <alexander.early@gmail.com> | 2017-03-25 15:26:14 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2017-03-25 15:26:14 -0700 |
commit | db9face308f5d00ca98c8d3c2080949b1db50ab7 (patch) | |
tree | fa70cc16dc33fbb4921dcde8deae8b3578b5640a /lib/auto.js | |
parent | ffd66850df894a5a961c8f2d21d75d0796448ce9 (diff) | |
download | async-db9face308f5d00ca98c8d3c2080949b1db50ab7.tar.gz |
handle async funcs in control flow methods
Diffstat (limited to 'lib/auto.js')
-rw-r--r-- | lib/auto.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/auto.js b/lib/auto.js index fe98e06..4d7bf32 100644 --- a/lib/auto.js +++ b/lib/auto.js @@ -8,6 +8,7 @@ import rest from './internal/rest'; import once from './internal/once'; import onlyOnce from './internal/onlyOnce'; +import wrapAsync from './internal/wrapAsync'; /** * Determines the best order for running the functions in `tasks`, based on @@ -213,7 +214,7 @@ export default function (tasks, concurrency, callback) { })); runningTasks++; - var taskFn = task[task.length - 1]; + var taskFn = wrapAsync(task[task.length - 1]); if (task.length > 1) { taskFn(results, taskCallback); } else { |