fix: mounting new children
This commit is contained in:
parent
2fdb499bd9
commit
7d436ab59a
@ -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,
|
||||
|
@ -355,7 +355,7 @@ export function normalizeVNode<T, U>(child: VNodeChild<T, U>): VNode<T, U> {
|
||||
|
||||
// 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user