File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -386,6 +386,7 @@ export class Overmind<ThisConfig extends IConfiguration>
386386 private createExecution ( name , action , parentExecution ) {
387387 if ( IS_PRODUCTION ) {
388388 return ( {
389+ parentExecution,
389390 getMutationTree : ( ) => {
390391 return this . proxyStateTree . getMutationTree ( )
391392 } ,
@@ -412,19 +413,21 @@ export class Overmind<ThisConfig extends IConfiguration>
412413 flush : ( ) => {
413414 return this . proxyStateTree . flush ( mutationTrees )
414415 } ,
415- getMutationTree : ( ) => {
416- const mutationTree = this . proxyStateTree . getMutationTree ( )
416+ getMutationTree : parentExecution
417+ ? parentExecution . getMutationTree
418+ : ( ) => {
419+ const mutationTree = this . proxyStateTree . getMutationTree ( )
417420
418- mutationTrees . push ( mutationTree )
421+ mutationTrees . push ( mutationTree )
419422
420- if ( this . mode . mode === MODE_TEST ) {
421- mutationTree . onMutation ( ( mutation ) => {
422- this . addExecutionMutation ( mutation )
423- } )
424- }
423+ if ( this . mode . mode === MODE_TEST ) {
424+ mutationTree . onMutation ( ( mutation ) => {
425+ this . addExecutionMutation ( mutation )
426+ } )
427+ }
425428
426- return mutationTree
427- } ,
429+ return mutationTree
430+ } ,
428431 scopeValue : ( value , tree ) => {
429432 return this . scopeValue ( value , tree )
430433 } ,
You can’t perform that action at this time.
0 commit comments