Skip to content

Commit

Permalink
fix(runtime-core): check the DEV_ROOT_FRAGMENT flag correctly in the …
Browse files Browse the repository at this point in the history
…dev environment (#2750)
  • Loading branch information
HcySunYang authored Feb 5, 2021
1 parent 2587f36 commit 347a879
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/runtime-core/src/componentRenderUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 347a879

Please sign in to comment.