wip(compiler): tests for new stringification

This commit is contained in:
Evan You
2020-05-15 15:50:42 -04:00
parent dbf627f136
commit baa6973b13
5 changed files with 88 additions and 55 deletions

View File

@@ -434,7 +434,7 @@ function genAssets(
}
}
function genHoists(hoists: JSChildNode[], context: CodegenContext) {
function genHoists(hoists: (JSChildNode | null)[], context: CodegenContext) {
if (!hoists.length) {
return
}
@@ -451,9 +451,11 @@ function genHoists(hoists: JSChildNode[], context: CodegenContext) {
}
hoists.forEach((exp, i) => {
push(`const _hoisted_${i + 1} = `)
genNode(exp, context)
newline()
if (exp) {
push(`const _hoisted_${i + 1} = `)
genNode(exp, context)
newline()
}
})
if (genScopeId) {