Closed
Description
What happened
After upgrading from 3.x
to 4.x
the getIn()
method is not behaving as before and not as documented. It often returns Invalid keyPath: Value at ["someKey"] does not have a .get() method: null
instead of handling null keys gracefully.
How to reproduce
const ABRecord = Immutable.Record({ a: 1})
const myRecord = new ABRecord()
console.log(myRecord.getIn(['a', 'b']));
Returns
TypeError: Invalid keyPath: Value at ["a"] does not have a .get() method: 1
But I expected it to return null
instead.
Metadata
Metadata
Assignees
Labels
No labels