Fix changing tab with page param bug (#114)
This commit is contained in:
parent
10e50795d9
commit
938af7c720
1 changed files with 1 additions and 0 deletions
|
@ -38,6 +38,7 @@
|
||||||
const url = new URL(window.location);
|
const url = new URL(window.location);
|
||||||
const searchParams = new URLSearchParams(url.search);
|
const searchParams = new URLSearchParams(url.search);
|
||||||
searchParams.set('tab', newTab);
|
searchParams.set('tab', newTab);
|
||||||
|
searchParams.delete('page');
|
||||||
url.search = searchParams.toString();
|
url.search = searchParams.toString();
|
||||||
return url.href;
|
return url.href;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue