fix: actually concatenate nested routes during route generation

This commit is contained in:
Greg Johnston 2024-06-14 12:41:51 -04:00
parent fbc6be922d
commit 0a41ae9a5e

View file

@ -253,14 +253,15 @@ where
})),
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,
}
}