Fix changing tab with page param bug (#114)

This commit is contained in:
Phuoc Anh Kha Le 2024-05-30 18:22:20 -05:00 committed by GitHub
parent 10e50795d9
commit 938af7c720
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
} }