Skip to content

Commit

Permalink
fix(runtime-core): fix dev fragment root flag check
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 30, 2021
1 parent 66b94dc commit 9cf7525
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,11 @@ function baseCreateRenderer(
}
if (parentComponent) {
let subTree = parentComponent.subTree
if (__DEV__ && subTree.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT) {
if (
__DEV__ &&
subTree.patchFlag > 0 &&
subTree.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT
) {
subTree =
filterSingleRoot(subTree.children as VNodeArrayChildren) || subTree
}
Expand Down

0 comments on commit 9cf7525

Please sign in to comment.