bigskysoftware / idiomorph

A DOM-merging algorithm
BSD 2-Clause "Simplified" License
631 stars 31 forks source link

Fix issue with attribute morphing #20

Closed DEfusion closed 6 months ago

DEfusion commented 7 months ago

This fixes an issue with attribute morphing when performing multiple morphs where some attributes were randomly being left over from the previous markup. Upon testing I found that looping through the toAttributes via a of loop was skipping over some attributes of the map entirely and that switching to looping through the array of values resolved this.

18

1cg commented 6 months ago

hey, can I ask you to narrow this change down to just idiomorph.js + the test, I'll generate the other stuff?

thank you for investigating this. Was it a browser specific issue?

1cg commented 6 months ago

Closing this PR because I fixed the issue slightly differently here: https://github.com/bigskysoftware/idiomorph/commit/53ab11d5f711bcebb748f29d3eccc0944bc45858 but very much appreciate you finding the issue and producing a test for it!