Skip to content

Commit 7efc6f3

Browse files
committed
Fixed "TypeError: Cannot read property 'line' of undefined"
1 parent 5178b2d commit 7efc6f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function highlightQuery (query, errors) {
88

99
query.split('\n').forEach(function (row, index) {
1010
var line = index + 1
11-
var lineErrors = locations.filter(function (loc) { return loc.line === line })
11+
var lineErrors = locations.filter(function (loc) { return loc && loc.line === line })
1212

1313
queryHighlight += row + '\n'
1414

0 commit comments

Comments
 (0)