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 logic error in reconcile_fragments #180

Merged
merged 1 commit into from
Jul 21, 2021

Conversation

dicej
Copy link
Contributor

@dicej dicej commented Jul 20, 2021

I noticed when using the Keyed component that when the KeyedProps::iterable
value changed from a large Vec to a smaller one containing a subset of the
original, not all the obsolete nodes were removed from the DOM.

Specifically, I started with a Vec with 10 elements, then removed all but the
third one. The nodes before the remaining node were removed, but not the ones
after it. This patch fixes the problem.

I noticed when using the `Keyed` component that when the `KeyedProps::iterable`
value changed from a large `Vec` to a smaller one containing a subset of the
original, not all the obsolete nodes were removed from the DOM.

Specifically, I started with a `Vec` with 10 elements, then removed all but the
third one.  The nodes before the remaining node were removed, but not the ones
after it.  This patch fixes the problem.
@lukechu10
Copy link
Member

Thanks for catching this!

@lukechu10 lukechu10 enabled auto-merge (squash) July 21, 2021 01:12
@lukechu10 lukechu10 merged commit ef84e31 into sycamore-rs:master Jul 21, 2021
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