There was an error while loading. Please reload this page.
1 parent cdffaf6 commit f9ff6ebCopy full SHA for f9ff6eb
packages/runtime-core/src/renderer.ts
@@ -1979,8 +1979,15 @@ function baseCreateRenderer(
1979
for (i = toBePatched - 1; i >= 0; i--) {
1980
const nextIndex = s2 + i
1981
const nextChild = c2[nextIndex] as VNode
1982
- const anchor =
1983
- nextIndex + 1 < l2 ? (c2[nextIndex + 1] as VNode).el : parentAnchor
+ let anchor = parentAnchor
+ 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
1991
if (newIndexToOldIndexMap[i] === 0) {
1992
// mount new
1993
patch(
0 commit comments