object-path-immutable icon indicating copy to clipboard operation
object-path-immutable copied to clipboard

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

Open zaubara opened this issue 7 years ago • 3 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 :)

zaubara avatar Oct 24 '17 13:10 zaubara

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

mariocasciaro avatar Oct 26 '17 15:10 mariocasciaro

Thanks - please have a look at #21

zaubara avatar Oct 27 '17 21:10 zaubara

That's awesome, thanks!

On Oct 27, 2017 10:16 PM, "Martin Puza" [email protected] wrote:

Thanks - please have a look at #21 https://github.com/mariocasciaro/object-path-immutable/pull/21

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mariocasciaro/object-path-immutable/issues/19#issuecomment-340088078, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGbZ6ITIk14o1y8_wiYsfG33iLSxGkoks5swkhHgaJpZM4QEaBT .

mariocasciaro avatar Oct 27 '17 21:10 mariocasciaro