Skip to content

Commit 347a879

Browse files
authored
fix(runtime-core): check the DEV_ROOT_FRAGMENT flag correctly in the dev environment (vuejs#2750)
1 parent 2587f36 commit 347a879

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/runtime-core/src/componentRenderUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ export function renderComponentRoot(
119119
// to have comments along side the root element which makes it a fragment
120120
let root = result
121121
let setRoot: ((root: VNode) => void) | undefined = undefined
122-
if (__DEV__ && result.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT) {
122+
if (
123+
__DEV__ &&
124+
result.patchFlag > 0 &&
125+
result.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT
126+
) {
123127
;[root, setRoot] = getChildRoot(result)
124128
}
125129

0 commit comments

Comments
 (0)