From b7e0674abefd6a0589d36ff67f4d0fe68141f446 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 26 Feb 2021 09:04:08 -0500 Subject: [PATCH] rebuild --- src/human.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/human.ts b/src/human.ts index f60718b8..ed5706d9 100644 --- a/src/human.ts +++ b/src/human.ts @@ -29,13 +29,9 @@ function mergeDeep(...objects) { Object.keys(obj || {}).forEach((key) => { const pVal = prev[key]; const oVal = obj[key]; - if (Array.isArray(pVal) && Array.isArray(oVal)) { - prev[key] = pVal.concat(...oVal); - } else if (isObject(pVal) && isObject(oVal)) { - prev[key] = mergeDeep(pVal, oVal); - } else { - prev[key] = oVal; - } + if (Array.isArray(pVal) && Array.isArray(oVal)) prev[key] = pVal.concat(...oVal); + else if (isObject(pVal) && isObject(oVal)) prev[key] = mergeDeep(pVal, oVal); + else prev[key] = oVal; }); return prev; }, {});