File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/node_modules/overmind/src/config Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -188,12 +188,15 @@ export function statechart<C extends IConfiguration, S extends string>(
188188 filter ( function canTransition ( _ , { transition } ) {
189189 return Boolean ( transition )
190190 } ) ,
191- mutate ( function changeState ( context : any , { transition, payload } ) {
191+ mutate ( function runAction ( context : any , { transition, payload } ) {
192192 if ( transition === 'entry' || transition === 'exit' ) {
193193 actions [ key ] ( context , payload )
194194 return
195195 }
196196
197+ actions [ key ] ( context , payload )
198+ } ) ,
199+ mutate ( function performTransition ( context : any ) {
197200 const stateTarget = getTarget (
198201 context . state ,
199202 context . execution . namespacePath
@@ -206,8 +209,6 @@ export function statechart<C extends IConfiguration, S extends string>(
206209 const currentStatePath = stateTarget . state . slice ( )
207210 const stateTransitions = currentStatePath . map ( ( ) => null )
208211
209- actions [ key ] ( context , payload )
210-
211212 // Build new transition path
212213 while ( currentStatePath . length ) {
213214 const target = getStateTarget ( chart , currentStatePath )
You can’t perform that action at this time.
0 commit comments