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
The oneOf decoder stores an Elm list of decoders, but when comparing for equality these lists are compared with _Json_listEquality, which compares JS arrays. The result is that oneOf decoders always compare as equal.
I noticed this when a custom event decoder was not being replaced as I expected. Here's an SSCCE that demonstrates such a case.
Which is old enough that it predates the Json stuff being split into a separate package from core.
I commented on it to ask the original author to re-create it on this repo, since it looks like a good patch and still relevant. If the author does not response, I will make a PR out of it on this repo.
The
oneOf
decoder stores an Elm list of decoders, but when comparing for equality these lists are compared with_Json_listEquality
, which compares JS arrays. The result is thatoneOf
decoders always compare as equal.I noticed this when a custom event decoder was not being replaced as I expected. Here's an SSCCE that demonstrates such a case.
The text was updated successfully, but these errors were encountered: