fix: get rollover working

This commit is contained in:
Jonathan Kelley committed 2022-12-13 14:44:47 -08:00
1 parent 79e786aca5
commit 5c20e651da
7 files changed
+61 -25

No files matched your search

+7 -4
View File
@@ -108,9 +108,10 @@ impl VirtualDom {
});
for root in node.root_ids {
let id = root.get().unwrap();
if id.0 != 0 {
self.try_reclaim(id);
if let Some(id) = root.get() {
if id.0 != 0 {
self.try_reclaim(id);
}
}
}
}
@@ -131,7 +132,9 @@ impl VirtualDom {
node.dynamic_nodes.iter().for_each(|child| match child {
// Only descend if the props are borrowed
DynamicNode::Component(c) if !c.static_props => {
self.ensure_drop_safety(c.scope.get().unwrap());
if let Some(scope) = c.scope.get() {
self.ensure_drop_safety(scope);
}
c.props.take();
}