Skip to content

Commit

Permalink
fix: don't fail if there is no template part in the SFC
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Sep 30, 2024
1 parent c4dd38e commit 725ebfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/esmVueTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function compileSfc(sfcStr, mixin) {
console.warn(compiledTemplate.tips);
}

const templateModule = (await toModule(compiledTemplate.code))
const templateModule = compiledTemplate && (await toModule(compiledTemplate.code))
return {
...(template && templateModule),
...(setup && {setup}),
Expand Down

0 comments on commit 725ebfd

Please sign in to comment.