Skip to content

Commit f17a82c

Browse files
committed
fix(hmr): always traverse static children in dev
fix #7921 close #8100
1 parent d53e157 commit f17a82c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/runtime-core/src/renderer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,8 @@ function baseCreateRenderer(
835835
areChildrenSVG,
836836
slotScopeIds
837837
)
838-
if (__DEV__ && parentComponent && parentComponent.type.__hmrId) {
838+
if (__DEV__) {
839+
// necessary for HMR
839840
traverseStaticChildren(n1, n2)
840841
}
841842
} else if (!optimized) {
@@ -1110,7 +1111,8 @@ function baseCreateRenderer(
11101111
isSVG,
11111112
slotScopeIds
11121113
)
1113-
if (__DEV__ && parentComponent && parentComponent.type.__hmrId) {
1114+
if (__DEV__) {
1115+
// necessary for HMR
11141116
traverseStaticChildren(n1, n2)
11151117
} else if (
11161118
// #2080 if the stable fragment has a key, it's a <template v-for> that may

0 commit comments

Comments
 (0)