fix(compiler-sfc): should ignore nodes with no children (#464)

This commit is contained in:
likui
2019-11-19 22:10:59 +08:00
committed by Evan You
parent f87dbea1f8
commit 1efb35e324
2 changed files with 11 additions and 0 deletions

View File

@@ -81,6 +81,9 @@ export function parse(
if (node.type !== NodeTypes.ELEMENT) {
return
}
if (!node.children.length) {
return
}
switch (node.tag) {
case 'template':
if (!sfc.template) {