Closed c4710n closed 4 months ago
Ah good catch. How did you find that it was being called twice?
I didn't find this issue through actual usage. I discovered it while reading the source code, as I was very interested in how Alpine is built.
Gotcha, good eye! I tested and you're right, it was getting called twice! Thanks
destroyTree
is hooked intomutation.js
by lifecycle.js#L22, and will be called when an element is removed.If we call it again, then we call it twice.
This PR removes the extra call, and it also eliminates the dependency-cycle between
lifecycle.js
andmutation.js
.