diff --git a/index.js b/index.js index 6d68a19..4eb33c9 100755 --- a/index.js +++ b/index.js @@ -137,7 +137,7 @@ exports.parse = function (path, map) { } parser.onError = function (err) { - if(err.message.indexOf("at position") > -1) + if(err.message.indexOf("in state") > -1) err.message = "Invalid JSON (" + err.message + ")"; stream.emit('error', err) }