mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 20:53:06 +00:00
don't reverse layouts
This commit is contained in:
parent
c33d1f5dc2
commit
199eb7a2db
1 changed files with 2 additions and 4 deletions
|
@ -253,13 +253,12 @@ impl RouteEnum {
|
||||||
|
|
||||||
if exclude {
|
if exclude {
|
||||||
let Some(layout_index) =
|
let Some(layout_index) =
|
||||||
layouts.iter().position(|l| l.comp == layout.comp)else{
|
layouts.iter().position(|l| l.comp == layout.comp) else {
|
||||||
return Err(syn::Error::new(
|
return Err(syn::Error::new(
|
||||||
Span::call_site(),
|
Span::call_site(),
|
||||||
"Attempted to exclude a layout that does not exist",
|
"Attempted to exclude a layout that does not exist",
|
||||||
));
|
));
|
||||||
}
|
};
|
||||||
;
|
|
||||||
excluded.push(LayoutId(layout_index));
|
excluded.push(LayoutId(layout_index));
|
||||||
} else {
|
} else {
|
||||||
let layout_index = layouts.len();
|
let layout_index = layouts.len();
|
||||||
|
@ -285,7 +284,6 @@ impl RouteEnum {
|
||||||
active_nests.reverse();
|
active_nests.reverse();
|
||||||
let mut active_layouts = layout_stack.clone();
|
let mut active_layouts = layout_stack.clone();
|
||||||
active_layouts.retain(|&id| !excluded.contains(&id));
|
active_layouts.retain(|&id| !excluded.contains(&id));
|
||||||
active_layouts.reverse();
|
|
||||||
|
|
||||||
let route = Route::parse(active_nests, active_layouts, variant.clone())?;
|
let route = Route::parse(active_nests, active_layouts, variant.clone())?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue