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
1 changed files with 6 additions and 8 deletions

View File

@ -201,14 +201,12 @@ export function compileScript(
let content = script.content let content = script.content
if (cssVars.length) { if (cssVars.length) {
content = rewriteDefault(content, `__default__`, plugins) content = rewriteDefault(content, `__default__`, plugins)
if (cssVars.length) {
content += genNormalScriptCssVarsCode( content += genNormalScriptCssVarsCode(
cssVars, cssVars,
bindings, bindings,
scopeId, scopeId,
!!options.isProd !!options.isProd
) )
}
content += `\nexport default __default__` content += `\nexport default __default__`
} }
return { return {