Ver Fonte

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

edison há 5 anos atrás
pai
commit
bf34e33c90
1 ficheiros alterados com 1 adições e 1 exclusões
  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)
   }
 }