Skip to content

Commit ba17792

Browse files
committed
fix(runtime-core): fix missed updates when passing vnode to <component :is>
fix #4903
1 parent 0f00cf4 commit ba17792

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: packages/runtime-core/src/vnode.ts

+8
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,14 @@ function _createVNode(
510510
if (children) {
511511
normalizeChildren(cloned, children)
512512
}
513+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
514+
if (cloned.shapeFlag & ShapeFlags.COMPONENT) {
515+
currentBlock[currentBlock.indexOf(type)] = cloned
516+
} else {
517+
currentBlock.push(cloned)
518+
}
519+
}
520+
cloned.patchFlag |= PatchFlags.BAIL
513521
return cloned
514522
}
515523

0 commit comments

Comments
 (0)