From 4bcfcb1503a27b33395384d216e787b283291d9c Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 23 Mar 2017 08:42:52 +0300 Subject: [PATCH] Suppress out-of-order lint invocation errors --- edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit.js b/edit.js index 94b647aa..d8e8b076 100644 --- a/edit.js +++ b/edit.js @@ -881,10 +881,10 @@ function updateLintReport(cm, delay) { var changed = false; var fixedOldIssues = false; scope.forEach(function(cm) { - var state = cm.state.lint; + var state = cm.state.lint || {}; var oldMarkers = state.markedLast || {}; var newMarkers = {}; - var html = state.marked.length == 0 ? "" : "" + + var html = !state.marked || state.marked.length == 0 ? "" : "" + state.marked.map(function(mark) { var info = mark.__annotation; var isActiveLine = info.from.line == cm.getCursor().line;