Skip to content

Commit

Permalink
Only check isBuffer if the platform has Buffer (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jan 24, 2021
1 parent ae264b0 commit 8b1cc94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -54,7 +54,7 @@ const destroyCircular = ({
}

for (const [key, value] of Object.entries(from)) {
if (Buffer.isBuffer(value)) {
if (typeof Buffer === 'function' && Buffer.isBuffer(value)) {
to[key] = '[object Buffer]';
continue;
}
Expand Down

0 comments on commit 8b1cc94

Please sign in to comment.