fix double drop of bubble id
This commit is contained in:
1 parent
9552ab6c1c
commit
02456c1068
3 files changed
+10
-3
No files matched your search
@@ -162,7 +162,9 @@ impl VirtualDom {
|
|||||||
let element_refs_slab = &mut self.element_refs;
|
let element_refs_slab = &mut self.element_refs;
|
||||||
for element_ref in element_refs.drain(..) {
|
for element_ref in element_refs.drain(..) {
|
||||||
println!("Dropping element ref {:?}", element_ref);
|
println!("Dropping element ref {:?}", element_ref);
|
||||||
element_refs_slab[element_ref.0].template = None;
|
if let Some(element_ref) = element_refs_slab.get_mut(element_ref.0) {
|
||||||
|
element_ref.template = None;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -371,7 +371,8 @@ impl VirtualDom {
|
|||||||
// Loop through each dynamic attribute (in a depth first order) in this template before moving up to the template's parent.
|
// Loop through each dynamic attribute (in a depth first order) in this template before moving up to the template's parent.
|
||||||
while let Some(el_ref) = parent_path {
|
while let Some(el_ref) = parent_path {
|
||||||
// safety: we maintain references of all vnodes in the element slab
|
// safety: we maintain references of all vnodes in the element slab
|
||||||
let template = unsafe { &*el_ref.template.unwrap() };
|
let template =
|
||||||
|
unsafe { &*el_ref.template.expect("template reference should be valid") };
|
||||||
let node_template = template.template.get();
|
let node_template = template.template.get();
|
||||||
let target_path = el_ref.path;
|
let target_path = el_ref.path;
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,11 @@ fn app(cx: Scope) -> Element {
|
|||||||
*CLICKS.lock().unwrap() += 1;
|
*CLICKS.lock().unwrap() += 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
problematic_child {}
|
vec![
|
||||||
|
render! {
|
||||||
|
problematic_child {}
|
||||||
|
}
|
||||||
|
].into_iter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user