PushRoot before adding children
This commit is contained in:
1 parent
aec5cd9dfa
commit
43b5a230f0
2 files changed
+2
-2
No files matched your search
@@ -423,8 +423,8 @@ impl<'b> DiffState<'b> {
|
||||
match (old.children.len(), new.children.len()) {
|
||||
(0, 0) => {}
|
||||
(0, _) => {
|
||||
let created = self.create_children(new.children);
|
||||
self.mutations.push_root(root);
|
||||
let created = self.create_children(new.children);
|
||||
self.mutations.append_children(created as u32);
|
||||
}
|
||||
(_, _) => self.diff_children(old.children, new.children),
|
||||
|
||||
+1
-1
@@ -749,8 +749,8 @@ fn add_nested_elements() {
|
||||
assert_eq!(
|
||||
change.edits,
|
||||
[
|
||||
CreateElement { root: 2, tag: "div" },
|
||||
PushRoot { root: 1 },
|
||||
CreateElement { root: 2, tag: "div" },
|
||||
AppendChildren { many: 1 },
|
||||
]
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user