]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): check the DEV_ROOT_FRAGMENT flag correctly in the dev environment...
authorHcySunYang <HcySunYang@outlook.com>
Fri, 5 Feb 2021 18:54:59 +0000 (02:54 +0800)
committerGitHub <noreply@github.com>
Fri, 5 Feb 2021 18:54:59 +0000 (19:54 +0100)
packages/runtime-core/src/componentRenderUtils.ts

index 44e6c8dcf91c67dc6993f84a87efe43d0da141cf..c1454e96c1e87fec8816b503722887637c9751c2 100644 (file)
@@ -119,7 +119,11 @@ export function renderComponentRoot(
     // to have comments along side the root element which makes it a fragment
     let root = result
     let setRoot: ((root: VNode) => void) | undefined = undefined
-    if (__DEV__ && result.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT) {
+    if (
+      __DEV__ &&
+      result.patchFlag > 0 &&
+      result.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT
+    ) {
       ;[root, setRoot] = getChildRoot(result)
     }