mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix/change: remove ?
prefix from search
in browser (matching server behavior) - closes #1071 (#1077)
This commit is contained in:
parent
a9ed8461d1
commit
91e0fcdc1b
1 changed files with 5 additions and 1 deletions
|
@ -42,7 +42,11 @@ impl TryFrom<&str> for Url {
|
|||
Ok(Self {
|
||||
origin: url.origin(),
|
||||
pathname: url.pathname(),
|
||||
search: url.search(),
|
||||
search: url
|
||||
.search()
|
||||
.strip_prefix('?')
|
||||
.map(String::from)
|
||||
.unwrap_or_default(),
|
||||
search_params: ParamsMap(
|
||||
try_iter(&url.search_params())
|
||||
.map_js_error()?
|
||||
|
|
Loading…
Reference in a new issue