From ba17792b7248552ea01a1ca6eca7d49b47d827f0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 12 May 2022 17:52:15 +0800 Subject: [PATCH] fix(runtime-core): fix missed updates when passing vnode to fix #4903 --- packages/runtime-core/src/vnode.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 60ea0f718..0a2543a70 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -510,6 +510,14 @@ function _createVNode( if (children) { normalizeChildren(cloned, children) } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & ShapeFlags.COMPONENT) { + currentBlock[currentBlock.indexOf(type)] = cloned + } else { + currentBlock.push(cloned) + } + } + cloned.patchFlag |= PatchFlags.BAIL return cloned }