mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
fix web query segments
This commit is contained in:
parent
37eb929d69
commit
2d916ef628
1 changed files with 4 additions and 8 deletions
|
@ -195,14 +195,10 @@ where
|
|||
<R as std::str::FromStr>::Err: std::fmt::Display,
|
||||
{
|
||||
fn route_from_location(&self) -> R {
|
||||
R::from_str(
|
||||
&self
|
||||
.window
|
||||
.location()
|
||||
.pathname()
|
||||
.unwrap_or_else(|_| String::from("/")),
|
||||
)
|
||||
.unwrap_or_else(|err| panic!("{}", err))
|
||||
let location = self.window.location();
|
||||
let path = location.pathname().unwrap_or_else(|_| "/".into())
|
||||
+ &location.search().unwrap_or("".into());
|
||||
R::from_str(&path).unwrap_or_else(|err| panic!("{}", err))
|
||||
}
|
||||
|
||||
fn full_path(&self, state: &R) -> String {
|
||||
|
|
Loading…
Reference in a new issue