Skip to content

Commit

Permalink
fix: fix undefined error for accessing lang of script
Browse files Browse the repository at this point in the history
  • Loading branch information
freedomlang committed Oct 18, 2023
1 parent 0ea614f commit ab042a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ module.exports = function (source) {
// let isTS = false
const { script, scriptSetup } = descriptor
if (script || scriptSetup) {
const lang = script.lang || (scriptSetup && scriptSetup.lang)
const lang = script?.lang || scriptSetup?.lang
// isTS = !!(lang && /tsx?/.test(lang))
const externalQuery =
script && !scriptSetup && script.src ? `&external` : ``
Expand Down

0 comments on commit ab042a1

Please sign in to comment.