Skip to content

Commit e0253c1

Browse files
committed
fix(runtime-core): synchronously update Suspense vnode's el during component self-update
1 parent 604d087 commit e0253c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/runtime-core/src/componentRenderUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ function hasPropsChanged(
451451
}
452452

453453
export function updateHOCHostEl(
454-
{ vnode, parent }: ComponentInternalInstance,
454+
{ vnode, parent, suspense }: ComponentInternalInstance,
455455
el: typeof vnode.el, // HostNode
456456
): void {
457457
while (parent) {
@@ -461,6 +461,7 @@ export function updateHOCHostEl(
461461
}
462462
if (root === vnode) {
463463
;(vnode = parent.vnode).el = el
464+
if (suspense && suspense.activeBranch === vnode) suspense.vnode.el = el
464465
parent = parent.parent
465466
} else {
466467
break

0 commit comments

Comments
 (0)