Skip to content

Commit

Permalink
fix: fix read property error for accessing lang of script (#2060)
Browse files Browse the repository at this point in the history
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
  • Loading branch information
freedomlang and sodatea committed Oct 18, 2023
1 parent 0ea614f commit 2a5c9aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
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 && script.lang) || (scriptSetup && scriptSetup.lang)
// isTS = !!(lang && /tsx?/.test(lang))
const externalQuery =
script && !scriptSetup && script.src ? `&external` : ``
Expand Down

0 comments on commit 2a5c9aa

Please sign in to comment.