Skip to content

Commit bef207d

Browse files
committed
fix: fix transition-group processing of whitespace nodes
fixes vuejs#4621, vuejs#4622
1 parent b9deb6e commit bef207d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/runtime-core/src/components/BaseTransition.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
cloneVNode,
99
Comment,
1010
isSameVNodeType,
11+
Text,
1112
VNode,
1213
VNodeArrayChildren,
1314
Fragment
@@ -470,7 +471,8 @@ export function getTransitionRawChildren(
470471
)
471472
}
472473
// comment placeholders should be skipped, e.g. v-if
473-
else if (keepComment || child.type !== Comment) {
474+
// #4621, #4622, #4637 also skip text nodes
475+
else if ((keepComment || child.type !== Comment) && child.type !== Text) {
474476
ret.push(child)
475477
}
476478
}

0 commit comments

Comments
 (0)