diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 0b86923e860..69056ccd0b2 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -1310,13 +1310,12 @@ export function createRenderer< const nextPos = e2 + 1 const anchor = nextPos < l2 ? (c2[nextPos] as HostVNode).el : parentAnchor - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i] as HostVNode) - : normalizeVNode(c2[i])) while (i <= e2) { patch( null, - n2, + (c2[i] = optimized + ? cloneIfMounted(c2[i] as HostVNode) + : normalizeVNode(c2[i])), container, anchor, parentComponent, diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 2d34e7c3b02..cab6ce8a994 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -355,7 +355,7 @@ export function normalizeVNode(child: VNodeChild): VNode { // optimized normalization for template-compiled render fns export function cloneIfMounted(child: VNode): VNode { - return child.el == null ? child : cloneVNode(child) + return child.el === null ? child : cloneVNode(child) } export function normalizeChildren(vnode: VNode, children: unknown) {