From: Evan You Date: Thu, 12 May 2022 09:52:15 +0000 (+0800) Subject: fix(runtime-core): fix missed updates when passing vnode to X-Git-Tag: v3.2.34-beta.1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba17792b7248552ea01a1ca6eca7d49b47d827f0;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): fix missed updates when passing vnode to fix #4903 --- diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 60ea0f718c..0a2543a70e 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 }