Skip to content

Commit

Permalink
fix(runtime-core): fix scheduler dedupe when not flushing
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jul 28, 2020
1 parent c27dfe1 commit 4ef5c8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let currentFlushPromise: Promise<void> | null = null

let isFlushing = false
let isFlushPending = false
let flushIndex = 0
let flushIndex = -1
let pendingPostFlushCbs: Function[] | null = null
let pendingPostFlushIndex = 0

Expand Down Expand Up @@ -114,7 +114,7 @@ function flushJobs(seen?: CountMap) {
callWithErrorHandling(job, null, ErrorCodes.SCHEDULER)
}
}
flushIndex = 0
flushIndex = -1
queue.length = 0

flushPostFlushCbs(seen)
Expand Down

0 comments on commit 4ef5c8d

Please sign in to comment.