@@ -299,7 +299,7 @@ export class Overmind<ThisConfig extends IConfiguration>
299299
300300 if ( IS_PRODUCTION && mode . mode === MODE_DEFAULT ) {
301301 eventHub . on ( EventType . OPERATOR_ASYNC , ( ) => {
302- proxyStateTree . getMutationTree ( ) . flush ( )
302+ proxyStateTree . getMutationTree ( ) . flush ( true )
303303 } )
304304 eventHub . on ( EventType . ACTION_END , ( execution ) => {
305305 if ( ! execution . parentExecution ) proxyStateTree . getMutationTree ( ) . flush ( )
@@ -413,21 +413,19 @@ export class Overmind<ThisConfig extends IConfiguration>
413413 flush : ( isAsync ?: boolean ) => {
414414 return this . proxyStateTree . flush ( mutationTrees , isAsync )
415415 } ,
416- getMutationTree : parentExecution
417- ? parentExecution . getMutationTree
418- : ( ) => {
419- const mutationTree = this . proxyStateTree . getMutationTree ( )
416+ getMutationTree : ( ) => {
417+ const mutationTree = this . proxyStateTree . getMutationTree ( )
420418
421- mutationTrees . push ( mutationTree )
419+ mutationTrees . push ( mutationTree )
422420
423- if ( this . mode . mode === MODE_TEST ) {
424- mutationTree . onMutation ( ( mutation ) => {
425- this . addExecutionMutation ( mutation )
426- } )
427- }
421+ if ( this . mode . mode === MODE_TEST ) {
422+ mutationTree . onMutation ( ( mutation ) => {
423+ this . addExecutionMutation ( mutation )
424+ } )
425+ }
428426
429- return mutationTree
430- } ,
427+ return mutationTree
428+ } ,
431429 scopeValue : ( value , tree ) => {
432430 return this . scopeValue ( value , tree )
433431 } ,
0 commit comments