Skip to content

Commit 610ed57

Browse files
fix(overmind): should allow mutation on the transition state itself
1 parent 784e721 commit 610ed57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node_modules/overmind/src/statemachine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class StateMachine<States extends string> {
2929
if (definition.states[this.current].includes(key as any)) {
3030
if (this[CURRENT_EXIT]) this._currentExit()
3131
this[VALUE][CURRENT_EXIT] = exit
32-
this.current = key as any
3332
const tree = (this[PROXY_TREE].master.mutationTree || this[PROXY_TREE])
3433
tree.enableMutations()
34+
this.current = key as any
3535
const result = entry && entry()
3636
tree.blockMutations()
3737

0 commit comments

Comments
 (0)