Skip to content

Commit ed6470c

Browse files
committed
fix(compiler-dom): fix transition children check for whitespace nodes
fix #4637
1 parent d23fde3 commit ed6470c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: packages/compiler-dom/src/transforms/warnTransitionChildren.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export const warnTransitionChildren: NodeTransform = (node, context) => {
3636
function hasMultipleChildren(node: ComponentNode | IfBranchNode): boolean {
3737
// #1352 filter out potential comment nodes.
3838
const children = (node.children = node.children.filter(
39-
c => c.type !== NodeTypes.COMMENT
39+
c =>
40+
c.type !== NodeTypes.COMMENT &&
41+
!(c.type === NodeTypes.TEXT && !c.content.trim())
4042
))
4143
const child = children[0]
4244
return (

0 commit comments

Comments
 (0)