Skip to content

Commit 2eabe02

Browse files
fix(overmind): run execution flush also on dev timeout
1 parent 1288c5a commit 2eabe02

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
@@ -316,7 +316,7 @@ export class Overmind<ThisConfig extends IConfiguration>
316316
})
317317
} else if (mode.mode === MODE_DEFAULT) {
318318
eventHub.on(EventType.OPERATOR_ASYNC, (execution) => {
319-
const flushData = execution.flush()
319+
const flushData = execution.flush(true)
320320
if (this.devtools && flushData.mutations.length) {
321321
this.devtools.send({
322322
type: 'flush',
@@ -410,8 +410,8 @@ export class Overmind<ThisConfig extends IConfiguration>
410410
let currentOperatorId = 0
411411
return () => ++currentOperatorId
412412
})(),
413-
flush: () => {
414-
return this.proxyStateTree.flush(mutationTrees)
413+
flush: (isAsync?: boolean) => {
414+
return this.proxyStateTree.flush(mutationTrees, isAsync)
415415
},
416416
getMutationTree: parentExecution
417417
? parentExecution.getMutationTree
@@ -574,7 +574,7 @@ export class Overmind<ThisConfig extends IConfiguration>
574574

575575
pendingFlush = setTimeout(() => {
576576
pendingFlush = null
577-
const flushData = mutationTree.flush(true)
577+
const flushData = execution.flush(true)
578578

579579
if (this.devtools && flushData.mutations.length) {
580580
this.devtools.send({

0 commit comments

Comments
 (0)