fix(Search): replace window.history.pushState with goto

This commit is contained in:
afn
2023-04-20 22:36:42 -04:00
parent 9734d9f64b
commit 77f0337445
2 changed files with 8 additions and 4 deletions

View File

@@ -1,14 +1,17 @@
<script lang="ts">
import { fade } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
import { page } from '$app/stores';
import { goto } from '$app/navigation';
export let title: string;
export let searchTerm: string | null;
export let searchTermFiltered: string | undefined;
import { fade } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
function clear() {
searchTerm = '';
searchTermFiltered = '';
window.history.pushState(null, '', window.location.href.split('?')[0])
goto($page.url.pathname)
}
</script>