mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Array.reduce instead of Promise.reduce
This commit is contained in:
parent
729381f25e
commit
b5757d334a
@ -530,9 +530,9 @@ class PluginManager {
|
||||
*/
|
||||
run(commandsArray) {
|
||||
// first initialize hooks
|
||||
return BbPromise.reduce(this.getHooks(['initialize']), (__, { hook }) => hook(), null).then(
|
||||
() => this.invoke(commandsArray)
|
||||
);
|
||||
return this.getHooks(['initialize'])
|
||||
.reduce((chain, { hook }) => chain.then(hook), Promise.resolve())
|
||||
.then(() => this.invoke(commandsArray));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user