File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -471,24 +471,32 @@ export default class App<
471471 } )
472472 this . devtools = devtools
473473 }
474- private initializeReactions ( configuration , eventHub , proxyStateTree , action ) {
474+ private initializeReactions (
475+ configuration ,
476+ eventHub ,
477+ proxyStateTree ,
478+ actionFactory
479+ ) {
475480 const reactions = Object . keys ( configuration . reactions || { } ) . reduce (
476481 ( aggr , name ) => {
477482 if ( typeof configuration . reactions [ name ] === 'function' ) {
478483 return Object . assign ( aggr , {
479- [ name ] : configuration . reactions [ name ] (
480- ( stateCb , action ) => [ stateCb , action ] ,
481- action
482- ) ,
484+ [ name ] : configuration . reactions [ name ] ( ( stateCb , action ) => {
485+ action . displayName = name
486+ return [ stateCb , action ]
487+ } , actionFactory ) ,
483488 } )
484489 }
485490
486491 return Object . keys ( configuration . reactions [ name ] || { } ) . reduce (
487492 ( aggr , subName ) =>
488493 Object . assign ( aggr , {
489494 [ name + '.' + subName ] : configuration . reactions [ name ] (
490- ( stateCb , action ) => [ stateCb , action ] ,
491- action
495+ ( stateCb , action ) => {
496+ action . displayName = name + '.' + subName
497+ return [ stateCb , action ]
498+ } ,
499+ actionFactory
492500 ) ,
493501 } ) ,
494502 { }
You can’t perform that action at this time.
0 commit comments