Skip to content

Commit 61f8d86

Browse files
committed
fix-buffers
1 parent ce4294a commit 61f8d86

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/deep-map.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const deepMap = (input, handler = v => v, path = ['$'], seen = new Set([input]))
88
if (input instanceof Error) {
99
return deepMap(serializeError(input), handler, path, seen)
1010
}
11-
if (input instanceof Buffer) {
11+
// allows for non-node js environments, sush as workers
12+
if (typeof Buffer !== 'undefined' && input instanceof Buffer) {
1213
return `[unable to log instanceof buffer]`
1314
}
1415
if (input instanceof Uint8Array) {

0 commit comments

Comments
 (0)