Skip to content

Commit

Permalink
chore: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Oct 24, 2023
1 parent 4bc0ed9 commit 9acce54
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/runtime-dom/src/components/TransitionGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ const TransitionGroupImpl: ComponentOptions = {
tag = 'span'
}

prevChildren = children
prevChildren =
children && children.filter(child => !isComment(child.el as Element))
children = slots.default ? getTransitionRawChildren(slots.default()) : []

for (let i = 0; i < children.length; i++) {
Expand All @@ -129,9 +130,6 @@ const TransitionGroupImpl: ComponentOptions = {
}

if (prevChildren) {
prevChildren = prevChildren.filter(
child => !isComment(child.el as Element)
)
for (let i = 0; i < prevChildren.length; i++) {
const child = prevChildren[i]
setTransitionHooks(
Expand Down

0 comments on commit 9acce54

Please sign in to comment.