mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 14:44:12 +00:00
Merge branch 'DioxusLabs:master' into dedup-history
This commit is contained in:
commit
0c093964bc
2 changed files with 8 additions and 2 deletions
|
@ -485,7 +485,13 @@ impl RouteEnum {
|
|||
let mut segments = route.split('/');
|
||||
// skip the first empty segment
|
||||
if s.starts_with('/') {
|
||||
segments.next();
|
||||
let _ = segments.next();
|
||||
}
|
||||
else {
|
||||
// if this route does not start with a slash, it is not a valid route
|
||||
return Err(dioxus_router::routable::RouteParseError {
|
||||
attempted_routes: Vec::new(),
|
||||
});
|
||||
}
|
||||
let mut errors = Vec::new();
|
||||
|
||||
|
|
|
@ -367,7 +367,7 @@ impl<'a> RouteTreeSegmentData<'a> {
|
|||
let child_name = &child.ident;
|
||||
|
||||
quote! {
|
||||
let mut trailing = String::new();
|
||||
let mut trailing = String::from("/");
|
||||
for seg in segments.clone() {
|
||||
trailing += seg;
|
||||
trailing += "/";
|
||||
|
|
Loading…
Reference in a new issue