Fix undefined stylelintDefaultConfig
This commit is contained in:
		
							parent
							
								
									7da5bd1408
								
							
						
					
					
						commit
						f36ce5c625
					
				| 
						 | 
				
			
			@ -15,8 +15,8 @@ function initLint() {
 | 
			
		|||
  BG.chromeLocal.getValue('editorStylelintRules').then(rules => setStylelintRules(rules));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setStylelintRules(rules = {}) {
 | 
			
		||||
  if (Object.keys(rules).length === 0) {
 | 
			
		||||
function setStylelintRules(rules = '') {
 | 
			
		||||
  if (Object.keys(rules).length === 0 && typeof stylelintDefaultConfig !== 'undefined') {
 | 
			
		||||
    rules = deepCopy(stylelintDefaultConfig.rules);
 | 
			
		||||
  }
 | 
			
		||||
  BG.chromeLocal.setValue('editorStylelintRules', rules);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user