fix replacing fragments

This commit is contained in:
Evan Almloff committed 2024-01-19 19:23:01 -06:00
1 parent 85c7c22619
commit b53ba7b5c7
3 files changed
+10 -7

No files matched your search

+5 -2
View File
@@ -297,8 +297,11 @@ impl VNode {
dom.reclaim(id)
}
Fragment(nodes) => {
for node in nodes {
node.remove_node(dom, to, replace_with, gen_muts)
for node in &nodes[..nodes.len() - 1] {
node.remove_node(dom, to, None, gen_muts)
}
if let Some(last_node) = nodes.last() {
last_node.remove_node(dom, to, replace_with, gen_muts)
}
}
};