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

🐛 Fixes Regression in Mutation handling #4450

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

ekwoka
Copy link
Contributor

@ekwoka ekwoka commented Nov 28, 2024

Fixes #4449

Due to the location of the check for "has this element already been initialized", elements that were moved within an alpine component, without a new wrapper element, were being improperly marked as only having been removed, and we summarily cleaned up and not reinitialized.

this just moves that check to just before the element would be reinitialized (Should this check maybe just be part of the lifecycle instead of mutation entirely?)

Includes test for the case that fails if you revert the changes to the mutation code.

@calebporzio calebporzio merged commit cb08c46 into alpinejs:main Nov 28, 2024
1 check passed
@calebporzio
Copy link
Collaborator

Legend, thank you

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