fix(transition): fix broken leave transition on dev root fragment (#5268)
This commit is contained in:
@@ -2159,7 +2159,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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user