From 4aadfcc38b74712473166f0e85d8114df852edf6 Mon Sep 17 00:00:00 2001 From: HcySunYang Date: Mon, 7 Dec 2020 16:14:17 +0800 Subject: [PATCH] fix(runtime-core): check the DEV_ROOT_FRAGMENT flag correctly in the dev environment --- packages/runtime-core/src/componentRenderUtils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index 44e6c8dcf91..c1454e96c1e 100644 --- a/packages/runtime-core/src/componentRenderUtils.ts +++ b/packages/runtime-core/src/componentRenderUtils.ts @@ -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) }