Skip to content

Commit

Permalink
Merge d68f149 into 22b6ae6
Browse files Browse the repository at this point in the history
  • Loading branch information
petermikitsh committed Dec 29, 2017
2 parents 22b6ae6 + d68f149 commit b65b656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/timm.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function doSetIn<T: ArrayOrObject>(
if (idx === path.length - 1) {
newValue = val;
} else {
const nestedObj = isObject(obj)
const nestedObj = isObject(obj) && isObject(obj[key])
? obj[key]
: typeof path[idx + 1] === 'number' ? [] : {};
newValue = doSetIn(nestedObj, path, val, idx + 1);
Expand Down

0 comments on commit b65b656

Please sign in to comment.