Skip to content

Commit f9ff6eb

Browse files
committed
wip: .
1 parent cdffaf6 commit f9ff6eb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/runtime-core/src/renderer.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,8 +1979,15 @@ function baseCreateRenderer(
19791979
for (i = toBePatched - 1; i >= 0; i--) {
19801980
const nextIndex = s2 + i
19811981
const nextChild = c2[nextIndex] as VNode
1982-
const anchor =
1983-
nextIndex + 1 < l2 ? (c2[nextIndex + 1] as VNode).el : parentAnchor
1982+
let anchor = parentAnchor
1983+
if (nextIndex + 1 < l2) {
1984+
const anchorVnode = c2[nextIndex + 1] as VNode
1985+
if (anchorVnode.component && !anchorVnode.component.asyncResolved) {
1986+
anchor = anchorVnode.component.subTree.el
1987+
} else {
1988+
anchor = anchorVnode.el
1989+
}
1990+
}
19841991
if (newIndexToOldIndexMap[i] === 0) {
19851992
// mount new
19861993
patch(

0 commit comments

Comments
 (0)