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 keyed components stopping cleanup #269

Merged
merged 3 commits into from
Nov 7, 2023
Merged

Conversation

brainkim
Copy link
Member

@brainkim brainkim commented Nov 7, 2023

Fixes #267.

Seems like an overzealous condition in the cleanup branch of the diffing process. I think the bug also only happens when the component element has no siblings, which is not an edge case in the JSX world, but something we don’t have a lot of tests for.

I have tried blaming the branch but it seems to have been preserved since 0.4.0 before I stopped checking. In any case, removing the guard is probably harmless. I have made unmountComponent() idempotent in any case.

@brainkim brainkim merged commit 4957f70 into master Nov 7, 2023
1 check failed
@brainkim brainkim deleted the keyed-component-bug branch November 7, 2023 04:39
@brainkim brainkim restored the keyed-component-bug branch November 7, 2023 04:40
@brainkim brainkim deleted the keyed-component-bug branch November 7, 2023 05:25
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.

Adding a $key prevents component lifecycle finally clause
1 participant