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

Bug - Components initialised twice #2060

Merged
merged 2 commits into from Sep 15, 2021

Conversation

SimoTod
Copy link
Collaborator

@SimoTod SimoTod commented Sep 13, 2021

When x-init is defined on an element without x-data and that element has child components (other x-data's. x-init's or both), those children are initialised twice. The reason is that x-init will initialise the component and all children but outNestedComponents only checks for parent components having x-data to skip the duplicated call.

@SimoTod SimoTod marked this pull request as ready for review September 13, 2021 12:54
@calebporzio
Copy link
Collaborator

Thanks @SimoTod !!

@calebporzio calebporzio merged commit c7077e9 into alpinejs:main Sep 15, 2021
@SimoTod SimoTod deleted the bug/duplicate-x-init branch November 20, 2021 00:28
@SimoTod SimoTod restored the bug/duplicate-x-init branch November 20, 2021 00:29
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