mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-30 16:09:12 +00:00
Merge branch 'master' of github.com:DioxusLabs/dioxus into router-2
This commit is contained in:
commit
e6b3497c06
1 changed files with 5 additions and 1 deletions
|
@ -95,7 +95,11 @@ impl VirtualDom {
|
|||
fn drop_scope_inner(&mut self, node: &VNode) {
|
||||
node.clear_listeners();
|
||||
node.dynamic_nodes.iter().for_each(|node| match node {
|
||||
DynamicNode::Component(c) => self.drop_scope(c.scope.get().unwrap()),
|
||||
DynamicNode::Component(c) => {
|
||||
if let Some(f) = c.scope.get() {
|
||||
self.drop_scope(f)
|
||||
}
|
||||
}
|
||||
DynamicNode::Fragment(nodes) => {
|
||||
nodes.iter().for_each(|node| self.drop_scope_inner(node))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue