if (refNode === null) {
queueNodeOp([platformAppendChild, container, newNode])
} else {
- queueNodeOp([platformInsertBefore, newNode, refNode])
+ queueNodeOp([platformInsertBefore, container, newNode, refNode])
}
}
// TODO infinite updates detection
-// import { Op } from './patchNodeOps'
-
type Op = [Function, ...any[]]
const enum Priorities {
// now we are really done
hasPendingFlush = false
pendingRejectors.length = 0
- while ((job = nextTickQueue.shift())) {
- job()
+ for (let i = 0; i < nextTickQueue.length; i++) {
+ nextTickQueue[i]()
}
+ nextTickQueue.length = 0
} else {
// got more job to do
// shouldn't reach here in compat mode, because the patchQueue is