Explorar o código

fix: go in reverse for building paths

Jonathan Kelley %!s(int64=2) %!d(string=hai) anos
pai
achega
4e75c707d1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/core/src/create.rs

+ 1 - 1
packages/core/src/create.rs

@@ -133,7 +133,7 @@ impl<'b> VirtualDom {
             None => return,
         };
 
-        for idx in start..=end {
+        for idx in (start..=end).rev() {
             let m = self.create_dynamic_node(template, &template.dynamic_nodes[idx], idx);
             if m > 0 {
                 // The path is one shorter because the top node is the root