Skip to content

Commit

Permalink
Improve compatibility with Next.js (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorPuga committed Nov 10, 2023
1 parent d9074a6 commit 6729be5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ const destroyCircular = ({
});

for (const [key, value] of Object.entries(from)) {
// eslint-disable-next-line node/prefer-global/buffer
if (typeof Buffer === 'function' && Buffer.isBuffer(value)) {
if (value && value instanceof Uint8Array && value.constructor.name === 'Buffer') {
to[key] = '[object Buffer]';
continue;
}
Expand Down

0 comments on commit 6729be5

Please sign in to comment.