We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca2571d commit 5429db9Copy full SHA for 5429db9
lib/utils/read-json.js
@@ -34,7 +34,7 @@ function processJson (opts, cb) {
34
if (cb) return cb(er, thing)
35
throw er
36
}
37
- if (Object.prototype.toString.call(thing) === "[object Object]") {
+ if (typeof thing === "object" && !Buffer.isBuffer(thing)) {
38
return processObject(opts, cb)(er, thing)
39
} else {
40
return processJsonString(opts, cb)(er, thing)
0 commit comments