From 427643bd4460b4ae8b44afd9001f76bc449b2ec0 Mon Sep 17 00:00:00 2001 From: Russell Choudhury Date: Mon, 7 Aug 2023 18:23:06 +0100 Subject: [PATCH] fix for Uint8Array --- lib/entries.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/entries.ts b/lib/entries.ts index 163d4b9..c46a363 100644 --- a/lib/entries.ts +++ b/lib/entries.ts @@ -7,7 +7,7 @@ const main = (object: GeneralObjectOrValue, existingKey = ""): [string, Ge const keyWithExisting = `${existingKey ? `${existingKey}.` : ""}${key}`; accumulator.push([keyWithExisting, value]); - if (typeof value === "object" && !(value instanceof Buffer) && value !== null && !isCircular(value, keyWithExisting)) { + if (typeof value === "object" && !(value instanceof Buffer) && !(value instanceof Uint8Array) && value !== null && !isCircular(value, keyWithExisting)) { accumulator.push(...main(value, keyWithExisting)); } diff --git a/package.json b/package.json index f07f67b..b6a2e48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "js-object-utilities", - "version": "2.1.0", + "version": "2.1.1", "description": "JavaScript utilities for nested objects", "main": "dist/index.js", "types": "dist/index.d.ts",