From c87ef331b043e4b66e62dae6431773f38f58809a Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sun, 29 Jun 2025 14:07:48 -0400 Subject: [PATCH] fix: fix: correctly construct child links during rebuild --- router/src/nested_router.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/router/src/nested_router.rs b/router/src/nested_router.rs index 5daa3968b..5381ce561 100644 --- a/router/src/nested_router.rs +++ b/router/src/nested_router.rs @@ -700,6 +700,12 @@ where .take(*items) .map(|route| (route.params.clone(), route.matched.clone())) .unzip(); + + if outlets.get(*items).is_some() && *items > 0 { + *outlets[*items - 1].child.0.lock().or_poisoned() = + Some(outlets[*items].clone()); + } + let current = outlets.get_mut(*items); match current { // if there's nothing currently in the routes at this point, build from here