Skip to content

Commit c51fb74

Browse files
authored
refactor(compiler-sfc): remove duplicate judgment conditions (#4368)
1 parent d8da421 commit c51fb74

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

packages/compiler-sfc/src/compileScript.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,12 @@ export function compileScript(
201201
let content = script.content
202202
if (cssVars.length) {
203203
content = rewriteDefault(content, `__default__`, plugins)
204-
if (cssVars.length) {
205-
content += genNormalScriptCssVarsCode(
206-
cssVars,
207-
bindings,
208-
scopeId,
209-
!!options.isProd
210-
)
211-
}
204+
content += genNormalScriptCssVarsCode(
205+
cssVars,
206+
bindings,
207+
scopeId,
208+
!!options.isProd
209+
)
212210
content += `\nexport default __default__`
213211
}
214212
return {

0 commit comments

Comments
 (0)