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

fix: Entangle inner state undefined #3681

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

danharrin
Copy link
Contributor

This was causing a serious Livewire issue for us where a $wire.entangle() was being removed after an AJAX request, which then caused inner to be undefined here, which crashed Livewire completely and made all further interactions break.

To fix this, I've reached for the already-stringified innerHashLatest and ensured that it is null instead of undefined in this case. If you don't want to reuse innerHashLatest here, I can swap it back for JSON.stringify(inner ?? null).

@calebporzio calebporzio merged commit 2337eac into alpinejs:main Jul 29, 2023
1 check passed
@calebporzio
Copy link
Collaborator

Thanks Dan!

@danharrin danharrin deleted the entangle-inner-state-undefined branch July 29, 2023 14:00
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.

None yet

2 participants