mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
fix: dont panic on cleanup
This commit is contained in:
parent
fa3d1ef574
commit
8530db69e1
1 changed files with 5 additions and 1 deletions
|
@ -355,7 +355,11 @@ impl<'b> VirtualDom {
|
|||
self.reclaim(id)
|
||||
}
|
||||
}
|
||||
Placeholder(t) => self.reclaim(t.id.take().unwrap()),
|
||||
Placeholder(t) => {
|
||||
if let Some(id) = t.id.take() {
|
||||
self.reclaim(id)
|
||||
}
|
||||
}
|
||||
Fragment(nodes) => nodes.iter().for_each(|node| self.clean_up_node(node)),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue