Skip to content

Commit

Permalink
Fix removing old nodes from parent (#428)
Browse files Browse the repository at this point in the history
Fix removal node condition in reconcile_fragments
  • Loading branch information
mc1098 authored May 30, 2022
1 parent 94eef35 commit 5f58fe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sycamore-core/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub fn reconcile_fragments<G: GenericNode>(parent: &G, a: &mut [G], b: &[G]) {
} else if b_end == b_start {
// Remove.
for node in &a[a_start..a_end] {
if map.is_none() || map.as_ref().unwrap().contains_key(node) {
if map.is_none() || !map.as_ref().unwrap().contains_key(node) {
parent.remove_child(node);
}
}
Expand Down

0 comments on commit 5f58fe3

Please sign in to comment.