diff --git a/edit/linter.js b/edit/linter.js index 4e7d5ea1..06d556ee 100644 --- a/edit/linter.js +++ b/edit/linter.js @@ -54,16 +54,8 @@ var linter = (() => { } function getAnnotations(...args) { - const result = []; return Promise.all(linters.map(fn => fn(...args))) - .then(results => { - for (const annotations of results) { - if (annotations) { - result.push(...annotations); - } - } - return result; - }); + .then(results => [].concat(...results.filter(Boolean))); } })();