We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81673ba commit 53237d2Copy full SHA for 53237d2
src/functional/updateIn.js
@@ -47,6 +47,13 @@ function updateInDeeply(
47
);
48
}
49
const key = keyPath[i];
50
+
51
+ if (typeof key === 'undefined') {
52
+ throw new TypeError(
53
+ 'Index can not be undefined in updateIn(). This should not happen'
54
+ );
55
+ }
56
57
const nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);
58
const nextUpdated = updateInDeeply(
59
nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting),
0 commit comments