Fix: lint initialize issue
This commit is contained in:
		
							parent
							
								
									d1964bbc16
								
							
						
					
					
						commit
						ba4c06ae82
					
				| 
						 | 
					@ -131,10 +131,9 @@ function initLint() {
 | 
				
			||||||
    $('#lint h2').addEventListener('click', toggleLintReport);
 | 
					    $('#lint h2').addEventListener('click', toggleLintReport);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  linterConfig.loadAll();
 | 
					  linterConfig.loadAll().then(updateLinter);
 | 
				
			||||||
  linterConfig.watchStorage();
 | 
					  linterConfig.watchStorage();
 | 
				
			||||||
  prefs.subscribe(['editor.linter'], updateLinter);
 | 
					  prefs.subscribe(['editor.linter'], updateLinter);
 | 
				
			||||||
  updateLinter();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function updateLinter({immediately} = {}) {
 | 
					function updateLinter({immediately} = {}) {
 | 
				
			||||||
| 
						 | 
					@ -531,8 +530,8 @@ function loadLinterAssets(name = prefs.get('editor.linter')) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function loadAddon() {
 | 
					  function loadAddon() {
 | 
				
			||||||
    if ($('script[src$="/vendor/codemirror/addon/lint/lint.js"]')) {
 | 
					    if (CodeMirror.lint) {
 | 
				
			||||||
      return Promise.resolve();
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return loadScript([
 | 
					    return loadScript([
 | 
				
			||||||
      '/vendor/codemirror/addon/lint/lint.css',
 | 
					      '/vendor/codemirror/addon/lint/lint.css',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user