diff --git a/src/object.ts b/src/object.ts index 2265cc08..445e301e 100644 --- a/src/object.ts +++ b/src/object.ts @@ -278,17 +278,16 @@ export const assign = >( const merged = { ...initial } for (const key in override) { - if(override.hasOwnProperty(key)) { - if(isObject(initial[key])) { + if (override.hasOwnProperty(key)) { + if (isObject(initial[key])) { merged[key] = assign(initial[key], override[key]) - } - else { + } else { merged[key] = override[key] } } } - return merged; + return merged } /**