refactor(compiler-sfc): remove duplicate judgment conditions (#4368)
This commit is contained in:
		
							parent
							
								
									d8da4214fc
								
							
						
					
					
						commit
						c51fb74599
					
				@ -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 {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user