Skip to content

Commit 5429db9

Browse files
committed
Fix for fast-buffers, which toString to [Object object]
1 parent ca2571d commit 5429db9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils/read-json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function processJson (opts, cb) {
3434
if (cb) return cb(er, thing)
3535
throw er
3636
}
37-
if (Object.prototype.toString.call(thing) === "[object Object]") {
37+
if (typeof thing === "object" && !Buffer.isBuffer(thing)) {
3838
return processObject(opts, cb)(er, thing)
3939
} else {
4040
return processJsonString(opts, cb)(er, thing)

0 commit comments

Comments
 (0)