File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -339,9 +339,9 @@ export class Overmind<Config extends Configuration> implements Configuration {
339339 }
340340 private createAction ( name , action ) {
341341 this . actionReferences . push ( action )
342- const actionFunc = ( value ?) => {
342+ const actionFunc = async ( value ?) => {
343343 if ( IS_PRODUCTION || action [ IS_OPERATOR ] ) {
344- return new Promise ( ( resolve , reject ) => {
344+ await new Promise ( ( resolve , reject ) => {
345345 const execution = this . createExecution ( name , action )
346346 this . eventHub . emit ( EventType . ACTION_START , execution )
347347
@@ -377,6 +377,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
377377 : undefined
378378 )
379379 } )
380+
380381 } else {
381382 const execution = {
382383 ...this . createExecution ( name , action ) ,
@@ -423,8 +424,8 @@ export class Overmind<Config extends Configuration> implements Configuration {
423424 result : undefined ,
424425 } )
425426 this . eventHub . emit ( EventType . ACTION_END , execution )
426-
427- return Promise . resolve ( this . options . testMode && execution )
427+ await result
428+ return this . options . testMode && execution
428429 }
429430 }
430431
You can’t perform that action at this time.
0 commit comments