]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): enter optimized mode for component as root
authorEvan You <yyx990803@gmail.com>
Thu, 15 Jul 2021 22:51:59 +0000 (18:51 -0400)
committerEvan You <yyx990803@gmail.com>
Thu, 15 Jul 2021 22:51:59 +0000 (18:51 -0400)
fix #3943

packages/runtime-core/src/renderer.ts

index 67c81aa4e16d2ab37c187ab3db2e9c6f24c3a6c8..545b5561c7cf456c0e6b943a23d2b74b199baa28 100644 (file)
@@ -487,7 +487,7 @@ function baseCreateRenderer(
     parentSuspense = null,
     isSVG = false,
     slotScopeIds = null,
-    optimized = false
+    optimized = __DEV__ && isHmrUpdating ? false : !!n2.dynamicChildren
   ) => {
     // patching & not same type, unmount old tree
     if (n1 && !isSameVNodeType(n1, n2)) {
@@ -772,7 +772,7 @@ function baseCreateRenderer(
           parentSuspense,
           isSVG && type !== 'foreignObject',
           slotScopeIds,
-          optimized || !!vnode.dynamicChildren
+          optimized
         )
       }