mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +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)
|
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)),
|
Fragment(nodes) => nodes.iter().for_each(|node| self.clean_up_node(node)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue