From: Evan You Date: Tue, 28 Jul 2020 17:23:09 +0000 (-0400) Subject: fix(runtime-core): fix scheduler dedupe when not flushing X-Git-Tag: v3.0.0-rc.5~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ef5c8d42408fd444114604292106c0027600fa4;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): fix scheduler dedupe when not flushing --- diff --git a/packages/runtime-core/src/scheduler.ts b/packages/runtime-core/src/scheduler.ts index b54f5469ce..07ee84a398 100644 --- a/packages/runtime-core/src/scheduler.ts +++ b/packages/runtime-core/src/scheduler.ts @@ -13,7 +13,7 @@ let currentFlushPromise: Promise | null = null let isFlushing = false let isFlushPending = false -let flushIndex = 0 +let flushIndex = -1 let pendingPostFlushCbs: Function[] | null = null let pendingPostFlushIndex = 0 @@ -114,7 +114,7 @@ function flushJobs(seen?: CountMap) { callWithErrorHandling(job, null, ErrorCodes.SCHEDULER) } } - flushIndex = 0 + flushIndex = -1 queue.length = 0 flushPostFlushCbs(seen)