From bb405f7a9b11a627aabf9ca0aa425b04449ad56f Mon Sep 17 00:00:00 2001 From: Matt VanNuys Date: Thu, 7 Sep 2017 15:23:08 -0400 Subject: [PATCH] Don't throw away the entire AST just because of syntax error --- lib/linter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linter.js b/lib/linter.js index a22339b..75ad1bf 100644 --- a/lib/linter.js +++ b/lib/linter.js @@ -113,7 +113,7 @@ function parse(text, filename) { return { messages, - ast: parseResult && parseResult.errors.length === 0 ? parseResult.ast : null + ast: parseResult && parseResult.ast ? parseResult.ast : null }; }