From 6bce2e2a8dd4cbbbbe083820e494ba858be74b16 Mon Sep 17 00:00:00 2001 From: Julian Perelli Date: Sun, 1 Nov 2020 19:12:45 +0100 Subject: [PATCH] Console error missed --- CHANGELOG.md | 1 + src/lib.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1338d66..1c513aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/lib.js b/src/lib.js index f7bcbc2..d948921 100644 --- a/src/lib.js +++ b/src/lib.js @@ -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)) } })