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'