mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
refactor(SearchParamsHandler): simplify URL parsing
This commit is contained in:
parent
2b8dc55893
commit
8f71788f4e
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ const SearchParamsHandler = () => {
|
|||
|
||||
const onLocationChange = () => {
|
||||
const { origin, hash, search } = window.location;
|
||||
const { searchParams } = new URL(`${origin}${search.length ? search : hash.replace('#', '')}`);
|
||||
const { searchParams } = new URL(`${origin}${hash.replace('#', '')}${search}`);
|
||||
|
||||
setSearchParams((previousSearchParams) => {
|
||||
const currentSearchParams = Object.fromEntries(searchParams.entries());
|
||||
|
|
|
|||
Loading…
Reference in a new issue