Skip to content

Commit 2bc6a8c

Browse files
committed
fix(hmr): static child traversal should only affect elements
1 parent aa1672a commit 2bc6a8c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/runtime-core/src/renderer.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,12 @@ function baseCreateRenderer(
19841984
for (let i = 0; i < ch1.length; i++) {
19851985
const c1 = ch1[i]
19861986
const c2 = ch2[i]
1987-
if (isVNode(c1) && isVNode(c2) && !c2.dynamicChildren) {
1987+
if (
1988+
isVNode(c1) &&
1989+
isVNode(c2) &&
1990+
c2.shapeFlag & ShapeFlags.ELEMENT &&
1991+
!c2.dynamicChildren
1992+
) {
19881993
if (c2.patchFlag <= 0) {
19891994
c2.el = c1.el
19901995
}

0 commit comments

Comments
 (0)