Skip to content

Commit

Permalink
update parents list on remove (#511)
Browse files Browse the repository at this point in the history
(cherry picked from commit c9e45e5)
  • Loading branch information
nicoburns committed Aug 13, 2023
1 parent 9a24382 commit 0e09e9a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ impl Taffy {
}
}

if let Some(children) = self.children.get(node) {
for child in children.iter().copied() {
self.parents[child.into()] = None;
}
}

let _ = self.children.remove(node);
let _ = self.parents.remove(node);
let _ = self.nodes.remove(node);
Expand Down

0 comments on commit 0e09e9a

Please sign in to comment.