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 committed 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
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.