From: HcySunYang Date: Fri, 5 Feb 2021 18:54:59 +0000 (+0800) Subject: fix(runtime-core): check the DEV_ROOT_FRAGMENT flag correctly in the dev environment... X-Git-Tag: v3.0.6~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=347a8798a4c5f0b426f3ac84a01d752d823fb51b;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): check the DEV_ROOT_FRAGMENT flag correctly in the dev environment (#2750) --- diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index 44e6c8dcf9..c1454e96c1 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) }