]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): fix dev fragment root flag check
authorEvan You <yyx990803@gmail.com>
Tue, 30 Mar 2021 23:55:05 +0000 (19:55 -0400)
committerEvan You <yyx990803@gmail.com>
Tue, 30 Mar 2021 23:55:05 +0000 (19:55 -0400)
packages/runtime-core/src/renderer.ts

index 5122e7a9131a5b24ff741788d9cdaa47818e2cd3..15f86faa438e3d2ab4c35d58a3980006c5f60056 100644 (file)
@@ -848,7 +848,11 @@ function baseCreateRenderer(
     }
     if (parentComponent) {
       let subTree = parentComponent.subTree
-      if (__DEV__ && subTree.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT) {
+      if (
+        __DEV__ &&
+        subTree.patchFlag > 0 &&
+        subTree.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT
+      ) {
         subTree =
           filterSingleRoot(subTree.children as VNodeArrayChildren) || subTree
       }