fix(runtime-core): fix dev fragment root flag check

This commit is contained in:
Evan You 2021-03-30 19:55:05 -04:00
parent 66b94dc5e1
commit 9cf75258c8

View File

@ -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
}