Fix back button not working

pull/3532/merge
Kamran Ahmed 1 year ago
parent f27aa58ac3
commit 573263ed74
  1. 4
      src/lib/browser.ts

@ -10,6 +10,10 @@ export function getUrlParams() {
export function deleteUrlParam(key: string) { export function deleteUrlParam(key: string) {
const url = new URL(window.location.href); const url = new URL(window.location.href);
if (!url.searchParams.has(key)) {
return;
}
url.searchParams.delete(key); url.searchParams.delete(key);
window.history.pushState(null, '', url.toString()); window.history.pushState(null, '', url.toString());
} }

Loading…
Cancel
Save