Skip to content

Commit

Permalink
refactor(compiler-sfc): remove duplicate judgment conditions (#4368)
Browse files Browse the repository at this point in the history
  • Loading branch information
javastation authored Aug 17, 2021
1 parent d8da421 commit c51fb74
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,12 @@ export function compileScript(
let content = script.content
if (cssVars.length) {
content = rewriteDefault(content, `__default__`, plugins)
if (cssVars.length) {
content += genNormalScriptCssVarsCode(
cssVars,
bindings,
scopeId,
!!options.isProd
)
}
content += genNormalScriptCssVarsCode(
cssVars,
bindings,
scopeId,
!!options.isProd
)
content += `\nexport default __default__`
}
return {
Expand Down

0 comments on commit c51fb74

Please sign in to comment.