Merge pull request #1406 from DioxusLabs/fix-router-query
Fix web query segments
This commit is contained in:
1 file changed
+4
-8
@@ -195,14 +195,10 @@ where
|
|||||||
<R as std::str::FromStr>::Err: std::fmt::Display,
|
<R as std::str::FromStr>::Err: std::fmt::Display,
|
||||||
{
|
{
|
||||||
fn route_from_location(&self) -> R {
|
fn route_from_location(&self) -> R {
|
||||||
R::from_str(
|
let location = self.window.location();
|
||||||
&self
|
let path = location.pathname().unwrap_or_else(|_| "/".into())
|
||||||
.window
|
+ &location.search().unwrap_or("".into());
|
||||||
.location()
|
R::from_str(&path).unwrap_or_else(|err| panic!("{}", err))
|
||||||
.pathname()
|
|
||||||
.unwrap_or_else(|_| String::from("/")),
|
|
||||||
)
|
|
||||||
.unwrap_or_else(|err| panic!("{}", err))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn full_path(&self, state: &R) -> String {
|
fn full_path(&self, state: &R) -> String {
|
||||||
|
|||||||
Reference in new issue
Block a user