From 0a41ae9a5e862633a7d58b0c991f694e7665b35a Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Fri, 14 Jun 2024 12:41:51 -0400 Subject: [PATCH] fix: actually concatenate nested routes during route generation --- router/src/matching/nested/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/router/src/matching/nested/mod.rs b/router/src/matching/nested/mod.rs index f34a00529..1e0eaa73a 100644 --- a/router/src/matching/nested/mod.rs +++ b/router/src/matching/nested/mod.rs @@ -249,18 +249,19 @@ where match children { None => Either::Left(iter::once(GeneratedRouteData { segments: segment_routes, - ssr_mode + ssr_mode })), Some(children) => { Either::Right(children.generate_routes().into_iter().map(move |child| { + let segments = segment_routes.clone().into_iter().chain(child.segments.into_iter()).collect(); if child.ssr_mode > ssr_mode { GeneratedRouteData { - segments: child.segments , + segments, ssr_mode: child.ssr_mode, } } else { GeneratedRouteData { - segments: child.segments , + segments, ssr_mode, } }