Skip to content

Commit

Permalink
fix(Transition): dev root fragment should have transition
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Jan 16, 2022
1 parent ccb6651 commit bf98f49
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,23 @@ function baseCreateRenderer(
const remove: RemoveFn = vnode => {
const { type, el, anchor, transition } = vnode
if (type === Fragment) {
removeFragment(el!, anchor!)
if (
__DEV__ &&
vnode.patchFlag > 0 &&
vnode.patchFlag & PatchFlags.DEV_ROOT_FRAGMENT &&
transition &&
!transition.persisted
) {
;(vnode.children as VNode[]).forEach(child => {
if (child.type === Comment) {
hostRemove(child.el!)
} else {
remove(child)
}
})
} else {
removeFragment(el!, anchor!)
}
return
}

Expand Down

0 comments on commit bf98f49

Please sign in to comment.