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