Skip to content

Commit

Permalink
fix: fix transition-group processing of whitespace nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
catrope committed Sep 21, 2021
1 parent b9deb6e commit bef207d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/runtime-core/src/components/BaseTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
cloneVNode,
Comment,
isSameVNodeType,
Text,
VNode,
VNodeArrayChildren,
Fragment
Expand Down Expand Up @@ -470,7 +471,8 @@ export function getTransitionRawChildren(
)
}
// comment placeholders should be skipped, e.g. v-if
else if (keepComment || child.type !== Comment) {
// #4621, #4622, #4637 also skip text nodes
else if ((keepComment || child.type !== Comment) && child.type !== Text) {
ret.push(child)
}
}
Expand Down

0 comments on commit bef207d

Please sign in to comment.