There was an error while loading. Please reload this page.
1 parent ce4294a commit 61f8d86Copy full SHA for 61f8d86
1 file changed
lib/deep-map.js
@@ -8,7 +8,8 @@ const deepMap = (input, handler = v => v, path = ['$'], seen = new Set([input]))
8
if (input instanceof Error) {
9
return deepMap(serializeError(input), handler, path, seen)
10
}
11
- if (input instanceof Buffer) {
+ // allows for non-node js environments, sush as workers
12
+ if (typeof Buffer !== 'undefined' && input instanceof Buffer) {
13
return `[unable to log instanceof buffer]`
14
15
if (input instanceof Uint8Array) {
0 commit comments