Skip to content

Commit

Permalink
Fixed "TypeError: Cannot read property 'line' of undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
ilearnio committed Jul 24, 2016
1 parent 5178b2d commit 7efc6f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

1 comment on commit 7efc6f3

@nordsimon
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I'll merge and publish this later

Please sign in to comment.