File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -648,17 +648,15 @@ export function run<Input, BaseContext = Context>(
648648 if ( err ) next ( err )
649649 else {
650650 startDebugOperator ( 'run' , operation , context )
651- const runNext = ( ) => {
652- const newContext = createContext ( context , context . value )
653- stopDebugOperator ( newContext )
654- next ( null , newContext )
655- }
656651 const result = operation ( context )
657- if ( result instanceof Promise ) {
658- result . then ( runNext ) . catch ( next )
659- } else {
660- runNext ( )
661- }
652+ const newContext = createContext (
653+ context ,
654+ result instanceof Promise
655+ ? result . then ( ( ) => context . value )
656+ : context . value
657+ )
658+ stopDebugOperator ( newContext )
659+ next ( null , newContext )
662660 }
663661 }
664662 instance [ IS_PIPE ] = true
You can’t perform that action at this time.
0 commit comments