mariocasciaro / object-path-immutable

Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot assign to read only property '0' of object '[object Array]'

zaubara opened this issue · comments

I'd like to update a value inside a deeply nested array (inside an immutable object), but that doesn't seem to work.
keyPath usually is somewhere along the lines of "data.common.languages.0.raw":
path.set(acc, curr.keyPath, curr.value)
Works in a non-immutable environment (ie. using object-path) fine; i'd expect that the immutable array inside the object isnt correctly extracted along the way?

Thanks :)

Could you please send a pull request with a failing test case please?

Thanks - please have a look at #21