]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(hmr): always traverse static children in dev
authorEvan You <yyx990803@gmail.com>
Thu, 20 Apr 2023 06:31:54 +0000 (14:31 +0800)
committerEvan You <yyx990803@gmail.com>
Thu, 20 Apr 2023 06:31:54 +0000 (14:31 +0800)
fix #7921
close #8100

packages/runtime-core/src/renderer.ts

index b1e048e588b425518b58fdba4e6be7517c1fe9f2..413355508b96db354bf28af5528ff05c53844b60 100644 (file)
@@ -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) {
@@ -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