File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,10 @@ import {
5656 createActionsProxy ,
5757 deepCopy ,
5858 getActionPaths ,
59+ getChangeMutations ,
5960 getFunctionName ,
6061 isPromise ,
61- processState ,
62- getChangeMutations
62+ processState
6363} from './utils'
6464
6565export * from './types'
@@ -603,12 +603,12 @@ export class Overmind<ThisConfig extends IConfiguration>
603603 const context = this . createContext ( execution , mutationTree )
604604
605605 try {
606- const result = action ( context , scopedValue )
606+ let result = action ( context , scopedValue )
607607
608608 if ( isPromise ( result ) ) {
609609 this . eventHub . emit ( EventType . OPERATOR_ASYNC , execution )
610- result
611- . then ( ( ) => {
610+ result = result
611+ . then ( ( promiseResult ) => {
612612 execution . isRunning = false
613613 if ( ! boundExecution ) {
614614 mutationTree . dispose ( )
@@ -619,6 +619,8 @@ export class Overmind<ThisConfig extends IConfiguration>
619619 result : undefined ,
620620 } )
621621 this . eventHub . emit ( EventType . ACTION_END , execution )
622+
623+ return promiseResult
622624 } )
623625 . catch ( ( error ) => {
624626 execution . isRunning = false
You can’t perform that action at this time.
0 commit comments