make get node parent mut optionally return a parent

This commit is contained in:
Evan Almloff committed 2022-11-24 22:16:27 -06:00
1 parent 21edea62be
commit e08a2186a6
2 files changed
+20 -3

No files matched your search

+1 -1
View File
@@ -97,7 +97,7 @@ impl<S: State> RealDom<S> {
}
fn resolve_height(&mut self, node_id: RealNodeId) {
if let Some((node, parent)) = self.tree.node_parent_mut(node_id) {
if let Some((node, Some(parent))) = self.tree.node_parent_mut(node_id) {
let height = parent.node_data.height;
node.node_data.height = height + 1;
unsafe {