Merge pull request #934 from Demonthos/fix-blitz-segfault
Always update root node refs
This commit is contained in:
2 files changed
+8
No files matched your search
@@ -35,6 +35,7 @@ fn sort_bfs(paths: &[&'static [u8]]) -> Vec<(usize, &'static [u8])> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
fn sorting() {
|
fn sorting() {
|
||||||
let r: [(usize, &[u8]); 5] = [
|
let r: [(usize, &[u8]); 5] = [
|
||||||
(0, &[0, 1]),
|
(0, &[0, 1]),
|
||||||
|
|||||||
@@ -148,6 +148,13 @@ impl<'b> VirtualDom {
|
|||||||
|
|
||||||
// Make sure the roots get transferred over while we're here
|
// Make sure the roots get transferred over while we're here
|
||||||
right_template.root_ids.transfer(&left_template.root_ids);
|
right_template.root_ids.transfer(&left_template.root_ids);
|
||||||
|
|
||||||
|
// Update the node refs
|
||||||
|
for i in 0..right_template.root_ids.len() {
|
||||||
|
if let Some(root_id) = right_template.root_ids.get(i) {
|
||||||
|
self.update_template(root_id, right_template);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn diff_dynamic_node(
|
fn diff_dynamic_node(
|
||||||
|
|||||||
Reference in new issue
Block a user