From 7efc6f3373d0046c255874e01b576efd503def92 Mon Sep 17 00:00:00 2001 From: ilearnio Date: Sun, 24 Jul 2016 16:22:34 +0300 Subject: [PATCH] Fixed "TypeError: Cannot read property 'line' of undefined" --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 509d392..a70d0f0 100644 --- a/index.js +++ b/index.js @@ -8,7 +8,7 @@ function highlightQuery (query, errors) { query.split('\n').forEach(function (row, index) { var line = index + 1 - var lineErrors = locations.filter(function (loc) { return loc.line === line }) + var lineErrors = locations.filter(function (loc) { return loc && loc.line === line }) queryHighlight += row + '\n'