handle abort diffing

This commit is contained in:
Evan Almloff committed 2023-01-07 19:01:29 -06:00
1 parent cb7e4f3f27
commit 927db9723a
2 files changed
+30 -7

No files matched your search

+8
View File
@@ -44,6 +44,14 @@ impl VirtualDom {
self.next_reference(template, ElementPath::Root(path))
}
pub(crate) fn next_null(&mut self) -> ElementId {
let entry = self.elements.vacant_entry();
let id = entry.key();
entry.insert(ElementRef::null());
ElementId(id)
}
fn next_reference(&mut self, template: &VNode, path: ElementPath) -> ElementId {
let entry = self.elements.vacant_entry();
let id = entry.key();