wip: fix insertBefore
This commit is contained in:
parent
544f37ae48
commit
5639022f80
@ -113,7 +113,7 @@ export function createRenderer(options: RendererOptions) {
|
||||
if (refNode === null) {
|
||||
queueNodeOp([platformAppendChild, container, newNode])
|
||||
} else {
|
||||
queueNodeOp([platformInsertBefore, newNode, refNode])
|
||||
queueNodeOp([platformInsertBefore, container, newNode, refNode])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
// TODO infinite updates detection
|
||||
|
||||
// import { Op } from './patchNodeOps'
|
||||
|
||||
type Op = [Function, ...any[]]
|
||||
|
||||
const enum Priorities {
|
||||
@ -180,9 +178,10 @@ function flush(): void {
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user