Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix: fixed skipping when first task in chain
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 3, 2018
1 parent c150469 commit 1c40e4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ const base = <I extends Types.Context>(context: I): Types.Base<I, {}> => {
plugins[k] = (...args: any[]) => {
const plugin = v(...args)
// clone context first
context = {...context as any}
if (plugin.init) plugin.init(context)
let c = {...context as any}
if (plugin.init) plugin.init(c)
return base({
...context as any,
chain: [...context.chain, plugin],
...c,
chain: [...c.chain, plugin],
})
}
return plugins
Expand Down

0 comments on commit 1c40e4c

Please sign in to comment.