]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): should still do full traverse of stable fragment children in dev...
authorEvan You <yyx990803@gmail.com>
Wed, 16 Sep 2020 17:01:53 +0000 (13:01 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 16 Sep 2020 17:01:53 +0000 (13:01 -0400)
packages/runtime-core/src/renderer.ts

index 6d01e3e51474520612a0ae202f62182e9edc1601..64d2d3c379ff075f39a76e64eeac5175d389a7f1 100644 (file)
@@ -1155,11 +1155,13 @@ function baseCreateRenderer(
           parentSuspense,
           isSVG
         )
-        // #2080 if the stable fragment has a key, it's a <template v-for> that may
-        //  get moved around. Make sure all root level vnodes inherit el.
-        // #2134 or if it's a component root, it may also get moved around
-        // as the component is being moved.
-        if (
+        if (__DEV__ && parentComponent && parentComponent.type.__hmrId) {
+          traverseStaticChildren(n1, n2)
+        } else if (
+          // #2080 if the stable fragment has a key, it's a <template v-for> that may
+          //  get moved around. Make sure all root level vnodes inherit el.
+          // #2134 or if it's a component root, it may also get moved around
+          // as the component is being moved.
           n2.key != null ||
           (parentComponent && n2 === parentComponent.subTree)
         ) {