diff --git a/alchemy/src/reconciler.rs b/alchemy/src/reconciler.rs index d1886da..15a5c71 100644 --- a/alchemy/src/reconciler.rs +++ b/alchemy/src/reconciler.rs @@ -129,7 +129,7 @@ pub fn diff_and_patch_tree(old: RSX, new: RSX, stretch: &mut Stretch, depth: usi match old_element.children.pop() { Some(child) => { if let RSX::VirtualNode(mut old_child) = child { - unmount_component_tree(&mut old_child)?; + unmount_component_tree(&mut old_child, stretch)?; } }, @@ -310,12 +310,12 @@ fn mount_component_tree(mut new_element: VirtualNode, stretch: &mut Stretch) -> /// /// This fires the hooks from a recursive inward-out pattern; that is, the deepest nodes in the tree /// are the first to go, ensuring that everything is properly cleaned up. -fn unmount_component_tree(old_element: &mut VirtualNode) -> Result<(), Box> { +fn unmount_component_tree(old_element: &mut VirtualNode, stretch: &mut Stretch) -> Result<(), Box> { // We only need to recurse on VirtualNodes. Text and so on will automagically drop // because we don't support freeform text, it has to be inside a at all times. for child in old_element.children.iter_mut() { if let RSX::VirtualNode(child_element) = child { - unmount_component_tree(child_element)?; + unmount_component_tree(child_element, stretch)?; } } @@ -323,7 +323,8 @@ fn unmount_component_tree(old_element: &mut VirtualNode) -> Result<(), Box Result<(), Box