fix(compiler-core): allow spaces between if-else branches (#2305)
fix #2299
This commit is contained in:
@@ -130,6 +130,16 @@ export function processIf(
|
||||
comments.unshift(sibling)
|
||||
continue
|
||||
}
|
||||
|
||||
if (
|
||||
sibling &&
|
||||
sibling.type === NodeTypes.TEXT &&
|
||||
!sibling.content.trim().length
|
||||
) {
|
||||
context.removeNode(sibling)
|
||||
continue
|
||||
}
|
||||
|
||||
if (sibling && sibling.type === NodeTypes.IF) {
|
||||
// move the node to the if node's branches
|
||||
context.removeNode()
|
||||
|
||||
Reference in New Issue
Block a user