Skip to content

Commit 709deb3

Browse files
authored
Update deep-map.js
1 parent 61f8d86 commit 709deb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/deep-map.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const Buffer = require('node:buffer')
12
const { serializeError } = require('./error')
23

34
const deepMap = (input, handler = v => v, path = ['$'], seen = new Set([input])) => {
@@ -9,7 +10,7 @@ const deepMap = (input, handler = v => v, path = ['$'], seen = new Set([input]))
910
return deepMap(serializeError(input), handler, path, seen)
1011
}
1112
// allows for non-node js environments, sush as workers
12-
if (typeof Buffer !== 'undefined' && input instanceof Buffer) {
13+
if (input instanceof Buffer) {
1314
return `[unable to log instanceof buffer]`
1415
}
1516
if (input instanceof Uint8Array) {

0 commit comments

Comments
 (0)