Skip to content

Commit 64522aa

Browse files
fix(overmind): change to method to grab mutationtree in production
1 parent 4ead51a commit 64522aa

File tree

1 file changed

+4
-4
lines changed
  • packages/node_modules/overmind/src

1 file changed

+4
-4
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ export class Overmind<Config extends Configuration> implements Configuration {
138138

139139
if (IS_PRODUCTION) {
140140
eventHub.on(EventType.OPERATOR_ASYNC, () => {
141-
proxyStateTree.mutationTree.flush()
141+
proxyStateTree.getMutationTree().flush()
142142
})
143143
eventHub.on(EventType.ACTION_END, () => {
144-
proxyStateTree.mutationTree.flush()
144+
proxyStateTree.getMutationTree().flush()
145145
})
146146

147147
let nextTick
148148
const flushTree = () => {
149-
proxyStateTree.mutationTree.flush(true)
149+
proxyStateTree.getMutationTree().flush(true)
150150
}
151151

152152
this.proxyStateTree.onMutation(() => {
@@ -201,7 +201,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
201201
if (IS_PRODUCTION) {
202202
return {
203203
getMutationTree: () => {
204-
return this.proxyStateTree.mutationTree
204+
return this.proxyStateTree.getMutationTree()
205205
},
206206
} as Execution
207207
}

0 commit comments

Comments
 (0)