fix: use stack optimization for replacer

This commit is contained in:
Jonathan Kelley committed 2022-12-19 11:14:01 -08:00
1 parent fcdd142c7f
commit 7a4b0d7c2d
5 files changed
+123 -69

No files matched your search

+6 -2
View File
@@ -115,10 +115,14 @@ impl VirtualDom {
nodes.iter().for_each(|node| self.drop_scope_inner(node))
}
DynamicNode::Placeholder(t) => {
self.try_reclaim(t.id.get().unwrap());
if let Some(id) = t.id.get() {
self.try_reclaim(id);
}
}
DynamicNode::Text(t) => {
self.try_reclaim(t.id.get().unwrap());
if let Some(id) = t.id.get() {
self.try_reclaim(id);
}
}
});