Browse Source

fix(runtime-core): ensure only skip unflushed job (#3406)

edison 5 years ago
parent
commit
bf34e33c90
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/runtime-core/src/scheduler.ts

+ 1 - 1
packages/runtime-core/src/scheduler.ts

@@ -110,7 +110,7 @@ function queueFlush() {
 
 export function invalidateJob(job: SchedulerJob) {
   const i = queue.indexOf(job)
-  if (i > -1) {
+  if (i > flushIndex) {
     queue.splice(i, 1)
   }
 }