Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ export function isObject(thing) {
}

export function mergeObjects(obj1, obj2, concatArrays = false) {
obj1 = obj1 instanceof Object ? obj1 : {};
obj2 = obj2 instanceof Object ? obj2 : {};
// Recursively merge deeply nested objects.
var acc = Object.assign({}, obj1); // Prevent mutation of source object.
return Object.keys(obj2).reduce((acc, key) => {
Expand Down