Suppress out-of-order lint invocation errors

This commit is contained in:
tophf 2017-03-23 08:42:52 +03:00
parent 54171ea084
commit 4bcfcb1503

View File

@ -881,10 +881,10 @@ function updateLintReport(cm, delay) {
var changed = false; var changed = false;
var fixedOldIssues = false; var fixedOldIssues = false;
scope.forEach(function(cm) { scope.forEach(function(cm) {
var state = cm.state.lint; var state = cm.state.lint || {};
var oldMarkers = state.markedLast || {}; var oldMarkers = state.markedLast || {};
var newMarkers = {}; var newMarkers = {};
var html = state.marked.length == 0 ? "" : "<tbody>" + var html = !state.marked || state.marked.length == 0 ? "" : "<tbody>" +
state.marked.map(function(mark) { state.marked.map(function(mark) {
var info = mark.__annotation; var info = mark.__annotation;
var isActiveLine = info.from.line == cm.getCursor().line; var isActiveLine = info.from.line == cm.getCursor().line;