Fix child fields with the web history (#2172)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
6a781af693
commit
9f280a8d84
1 file changed
+18
-7
@@ -462,14 +462,25 @@ impl RouteEnum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for route in &self.routes {
|
for route in &self.routes {
|
||||||
for segment in &route.segments {
|
match &route.ty {
|
||||||
if segment.name().as_ref() == Some(field) {
|
RouteType::Child(child) => {
|
||||||
from_route = true
|
if let Some(child) = child.ident.as_ref() {
|
||||||
|
if child == "child" {
|
||||||
|
from_route = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
RouteType::Leaf { .. } => {
|
||||||
if let Some(query) = &route.query {
|
for segment in &route.segments {
|
||||||
if query.contains_ident(field) {
|
if segment.name().as_ref() == Some(field) {
|
||||||
from_route = true
|
from_route = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if let Some(query) = &route.query {
|
||||||
|
if query.contains_ident(field) {
|
||||||
|
from_route = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user