elm / virtual-dom

The foundation of HTML and SVG in Elm.
https://package.elm-lang.org/packages/elm/virtual-dom/latest
BSD 3-Clause "New" or "Revised" License
209 stars 80 forks source link

Fix potential runtime error when diffing keyed nodes #140

Closed hpate-omicron closed 5 years ago

hpate-omicron commented 5 years ago

Reported Issues: https://github.com/elm/html/issues/171 https://github.com/elm/html/issues/178

The while loop could cause a previous match to be reused and lead to the runtime issues reported above.

harrysarson commented 5 years ago

Manually editing the javascript generated by elm make for the sscce in elm/html#178 with @hpate-omicron's patch fixes the bug for me. 🎆

evancz commented 5 years ago

Thank you to the folks on Slack that figured this out!

felixakiragreen commented 5 years ago

Thanks for the quick fix! I just ran into this.