不要怂,就是干,撸起袖子干!

Commit be82452f by overlookmotel

Replace `.map()` with `.each()`

1 parent 10e81b96
Showing with 2 additions and 2 deletions
......@@ -98,7 +98,7 @@ Hooks.runHooks = function(hooks) {
hooks = hooks === undefined ? [] : [hooks];
}
var promise = Promise.map(hooks, function(hook) {
var promise = Promise.each(hooks, function(hook) {
if (typeof hook === 'object') {
hook = hook.fn;
}
......@@ -108,7 +108,7 @@ Hooks.runHooks = function(hooks) {
}
return hook.apply(self, fnArgs);
}, {concurrency: 1}).return();
}).return();
if (fn) {
return promise.nodeify(fn);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!