Skip to content

Commit

Permalink
fix: compile error when no script (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz authored Jun 26, 2022
1 parent b12eb88 commit 6b9b7bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ async function doCompileTemplate(
`$1 ${fnName}`
)}` + `\n${COMP_IDENTIFIER}.${fnName} = ${fnName}`

if ((descriptor.script || descriptor.scriptSetup)!.lang === 'ts') {
if ((descriptor.script || descriptor.scriptSetup)?.lang === 'ts') {
code = await transformTS(code)
}

Expand Down

0 comments on commit 6b9b7bc

Please sign in to comment.