immutable-js-oss/immutable-js

Immutable objects are still mutable

Methuselah96 opened this issue · 1 comments

From @mesolido on Sat, 17 Oct 2020 15:19:40 GMT

I just came across your library.

I tried this on the example you provided on https://immutable-js.github.io/immutable-js/
map1._root.entries[1][1] = 50
Then, if I print map1.get('b'), its value is effectively 50

How is that possible, since map1 is supposed to be immutable.

Also, it is possible to add new entries to map1.
map1._root.entries.push(['d', 4])
map1.size = 4
map1.get('d') gives 4

Am I misunderstanding or your data structures are not really immutable ?

Copied from original issue: immutable-js#1793

Addressed on original repo.