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])