fix(compiler-dom): fix transition children check for whitespace nodes
fix #4637
This commit is contained in:
parent
d23fde3d3b
commit
ed6470c845
@ -36,7 +36,9 @@ export const warnTransitionChildren: NodeTransform = (node, context) => {
|
|||||||
function hasMultipleChildren(node: ComponentNode | IfBranchNode): boolean {
|
function hasMultipleChildren(node: ComponentNode | IfBranchNode): boolean {
|
||||||
// #1352 filter out potential comment nodes.
|
// #1352 filter out potential comment nodes.
|
||||||
const children = (node.children = node.children.filter(
|
const children = (node.children = node.children.filter(
|
||||||
c => c.type !== NodeTypes.COMMENT
|
c =>
|
||||||
|
c.type !== NodeTypes.COMMENT &&
|
||||||
|
!(c.type === NodeTypes.TEXT && !c.content.trim())
|
||||||
))
|
))
|
||||||
const child = children[0]
|
const child = children[0]
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user