Skip to content

Commit c27dfe1

Browse files
committed
fix(runtime-core): scheduler should allow intentional self triggering effects
fix #1727
1 parent 730e39e commit c27dfe1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/runtime-core/src/scheduler.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function nextTick(fn?: () => void): Promise<void> {
2626
}
2727

2828
export function queueJob(job: Job) {
29-
if (!queue.includes(job, flushIndex)) {
29+
if (!queue.includes(job, flushIndex + 1)) {
3030
queue.push(job)
3131
queueFlush()
3232
}
@@ -43,7 +43,7 @@ export function queuePostFlushCb(cb: Function | Function[]) {
4343
if (!isArray(cb)) {
4444
if (
4545
!pendingPostFlushCbs ||
46-
!pendingPostFlushCbs.includes(cb, pendingPostFlushIndex)
46+
!pendingPostFlushCbs.includes(cb, pendingPostFlushIndex + 1)
4747
) {
4848
postFlushCbs.push(cb)
4949
}

0 commit comments

Comments
 (0)