Skip to content

Commit

Permalink
Console error missed
Browse files Browse the repository at this point in the history
  • Loading branch information
jperelli committed Nov 1, 2020
1 parent 1c44d9f commit 6bce2e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Read geojson from file or stdin

- Add new option '-f' to read geojson from file, stdin ('-') or url
- Fix minor issue on console error misses

# 3.8.1

Expand Down
2 changes: 1 addition & 1 deletion src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module.exports = function(options) {
page.on('error', function (err) { reject(err.toString()) })
page.on('pageerror', function (err) { reject(err.toString()) })
page.on('console', function (msg) {
if (msg.type === 'error') {
if (msg.type() === 'error') {
reject(JSON.stringify(msg))
}
})
Expand Down

0 comments on commit 6bce2e2

Please # to comment.