Skip to content

Commit 790db19

Browse files
fix(overmind): wrong call on exit on statemachine
1 parent dffb006 commit 790db19

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/node_modules/overmind/src/statemachine.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { PROXY_TREE, VALUE } from 'proxy-state-tree'
22

3-
import { Derive } from './'
4-
53
export type StatemachineDefinition<States extends string> = {
64
initial: States,
75
states: {
@@ -27,7 +25,7 @@ class StateMachine<States extends string> {
2725
Object.keys(definition.states).reduce((aggr, key) => {
2826
aggr[key] = function (entry, exit) {
2927
if (definition.states[this.current].includes(key as any)) {
30-
if (this[CURRENT_EXIT]) this._currentExit()
28+
if (this[CURRENT_EXIT]) this[CURRENT_EXIT]()
3129
this[VALUE][CURRENT_EXIT] = exit
3230
this.current = key as any
3331
const tree = (this[PROXY_TREE].master.mutationTree || this[PROXY_TREE])

0 commit comments

Comments
 (0)