Skip to content

Commit

Permalink
Replace Reflect.has() with the in operator (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivamJoker committed Dec 8, 2020
1 parent e220607 commit bc646cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const deepMerge = (...sources) => {
returnValue = [...returnValue, ...source];
} else if (isObject(source)) {
for (let [key, value] of Object.entries(source)) {
if (isObject(value) && Reflect.has(returnValue, key)) {
if (isObject(value) && (key in returnValue)) {
value = deepMerge(returnValue[key], value);
}

Expand Down

0 comments on commit bc646cd

Please sign in to comment.