Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct equality check on oneOf decoders for virtual DOM diffing. #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rupertlssmith
Copy link

This fixes the equality check on oneOf decoders, and this solution will work with 0.19.1 in --optimize mode, or without --optimize.

The problem can be seen in this Ellie, the oneOf decoder there captures stale state from the model, as the vdom diffing fails to detect that it has changed:

https://ellie-app.com/3HKzFLVbBhxa1

Fixes these issues:

#15
elm/core#904

This PR was adapted from the original PR (now closed):

elm/core#905

rupertlssmith added a commit to elm-janitor/json that referenced this pull request Mar 11, 2022
Correct equality check on oneOf decoders for virtual DOM diffing.
@ggPeti
Copy link

ggPeti commented May 10, 2023

Please merge and release this finally @evancz. The PR has been open for 5 and a half years now and people will keep wasting their time debugging unless a fix is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants