Explorar o código

fix removing root nodes

Evan Almloff hai 1 ano
pai
achega
f1b2f964c0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/core/src/diff/node.rs

+ 1 - 1
packages/core/src/diff/node.rs

@@ -236,7 +236,7 @@ impl VNode {
                 self.remove_dynamic_node(mount, dom, to, idx, dynamic_node, gen_muts);
                 self.remove_dynamic_node(mount, dom, to, idx, dynamic_node, gen_muts);
             } else {
             } else {
                 let mount = &dom.mounts[mount.0];
                 let mount = &dom.mounts[mount.0];
-                let id = ElementId(mount.mounted_dynamic_nodes[idx]);
+                let id = mount.root_ids[idx];
                 if gen_muts {
                 if gen_muts {
                     to.remove_node(id);
                     to.remove_node(id);
                 }
                 }