Closed
Description
Sometimes, I have complex paths with maps and lists when using updateIn, and noticed something weird if passing a string instead of a number for a List index:
Immutable.List([]).setIn(['a'], 2).toJS()
returns []
Immutable.List([]).setIn(['123'], 2).toJS()
returns Array of size [1231]
Not sure best solution, buy perhaps way to go would be to try coerce string to number or only accept number for the indices and throw an exception.
Metadata
Metadata
Assignees
Labels
No labels