fix replacing fragments
This commit is contained in:
1 parent
85c7c22619
commit
b53ba7b5c7
3 files changed
+10
-7
No files matched your search
@@ -284,8 +284,8 @@ impl VirtualDom {
|
||||
// create the new children afresh.
|
||||
if shared_keys.is_empty() {
|
||||
if !old.is_empty() {
|
||||
self.remove_nodes(to, &old[1..], None);
|
||||
old[0].replace(new, parent, self, to);
|
||||
let m = self.create_children(to, new, parent);
|
||||
self.remove_nodes(to, old, Some(m));
|
||||
} else {
|
||||
// I think this is wrong - why are we appending?
|
||||
// only valid of the if there are no trailing elements
|
||||
|
||||
Reference in new issue
Block a user