File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/compiler-sfc/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export function parse(
107
107
sourceRoot +
108
108
pad +
109
109
compiler . parse +
110
- ( defaultScriptLang ?? '' )
110
+ ( defaultScriptLang || '' )
111
111
const cache = sourceToSFC . get ( sourceKey )
112
112
if ( cache ) {
113
113
return cache
@@ -199,12 +199,12 @@ export function parse(
199
199
const scriptBlock = createBlock ( node , source , pad ) as SFCScriptBlock
200
200
const isSetup = ! ! scriptBlock . attrs . setup
201
201
if ( isSetup && ! descriptor . scriptSetup ) {
202
- scriptBlock . lang ?? = defaultScriptLang
202
+ if ( ! scriptBlock . lang ) scriptBlock . lang = defaultScriptLang
203
203
descriptor . scriptSetup = scriptBlock
204
204
break
205
205
}
206
206
if ( ! isSetup && ! descriptor . script ) {
207
- scriptBlock . lang ?? = defaultScriptLang
207
+ if ( ! scriptBlock . lang ) scriptBlock . lang = defaultScriptLang
208
208
descriptor . script = scriptBlock
209
209
break
210
210
}
You can’t perform that action at this time.
0 commit comments