You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 23, 2021. It is now read-only.
I think the latest changes to Hash.js introduce a weird bug when hashing custom objects, more specifically, a class with valueOf() overridden. The error being thrown is Uncaught TypeError: Invalid value used as weak map key.
It's strange because it doesn't happen until a certain point, a very specific point. It happens when invoking .set() on a Map on the 9th attempt. For the first 8 attempts, all is good. On the 9th attempt, error.
From @UnsungHero97 on Tue, 06 Nov 2018 20:24:11 GMT
I think the latest changes to
Hash.js
introduce a weird bug when hashing custom objects, more specifically, a class withvalueOf()
overridden. The error being thrown isUncaught TypeError: Invalid value used as weak map key
.It's strange because it doesn't happen until a certain point, a very specific point. It happens when invoking
.set()
on aMap
on the 9th attempt. For the first 8 attempts, all is good. On the 9th attempt, error.To reproduce, I ran this bit of code in the console at https://facebook.github.io/immutable-js.
This has worked for me for quite a while. It breaks with release
v4.0.0-rc.11
.Here's a screenshot of the console:
Copied from original issue: immutable-js#1643
The text was updated successfully, but these errors were encountered: