diff --git a/src/object.ts b/src/object.ts index e9277073..e14494e6 100644 --- a/src/object.ts +++ b/src/object.ts @@ -281,7 +281,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])