refactor(compiler-sfc): remove duplicate judgment conditions (#4368)

This commit is contained in:
似水微寒 2021-08-18 00:12:18 +08:00 committed by GitHub
parent d8da4214fc
commit c51fb74599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {