From cf58a482758baadf3cc8f1c323ec28c29761e391 Mon Sep 17 00:00:00 2001 From: Alec Larson <1925840+aleclarson@users.noreply.github.com> Date: Mon, 24 Jun 2024 03:10:38 -0400 Subject: [PATCH] chore(fix): use `cloneObject` to preserve prototype --- src/object.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object.ts b/src/object.ts index 53442633..b5a416c8 100644 --- a/src/object.ts +++ b/src/object.ts @@ -283,7 +283,7 @@ export const assign = >( override: X ): X => { if (!initial || !override) return initial ?? override ?? {} - const merged = { ...initial } + const merged = cloneObject(initial) for (const key in override) { if (hasOwnProperty(override, key)) { merged[key] = isPlainObject(initial[key])