Skip to content

Commit

Permalink
fix(hmr): always traverse static children in dev
Browse files Browse the repository at this point in the history
fix #7921
close #8100
  • Loading branch information
yyx990803 committed Apr 20, 2023
1 parent d53e157 commit f17a82c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,8 @@ function baseCreateRenderer(
areChildrenSVG,
slotScopeIds
)
if (__DEV__ && parentComponent && parentComponent.type.__hmrId) {
if (__DEV__) {
// necessary for HMR
traverseStaticChildren(n1, n2)
}
} else if (!optimized) {
Expand Down Expand Up @@ -1110,7 +1111,8 @@ function baseCreateRenderer(
isSVG,
slotScopeIds
)
if (__DEV__ && parentComponent && parentComponent.type.__hmrId) {
if (__DEV__) {
// necessary for HMR
traverseStaticChildren(n1, n2)
} else if (
// #2080 if the stable fragment has a key, it's a <template v-for> that may
Expand Down

0 comments on commit f17a82c

Please sign in to comment.