Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
linzhe141 committed Sep 13, 2024
1 parent 64b721c commit 6bcb45f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/runtime-core/src/componentRenderUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ export function renderComponentRoot(
}
}

// #5407
if (!__DEV__ && root.type === Fragment) {
const singleRoot = filterSingleRoot(root.children as VNodeArrayChildren)
if (singleRoot) root = singleRoot
Expand Down
6 changes: 5 additions & 1 deletion packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,11 @@ function baseCreateRenderer(
let shouldInvokeDirs = shapeFlag & ShapeFlags.ELEMENT && dirs
// #5407
let root: VNode | undefined = undefined
if (__DEV__ && vnode.type === Fragment) {
if (
__DEV__ &&
vnode.patchFlag > 0 &&
vnode.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT
) {
const singleRoot = filterSingleRoot(vnode.children as VNodeArrayChildren)
if (singleRoot) {
root = singleRoot
Expand Down

0 comments on commit 6bcb45f

Please sign in to comment.