-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
Describe the bug
I have this code in a Svelte 5 / SvelteKit 2 app:
<script lang="ts">
import { resolve } from '$app/paths';
// ...
</script>
{#each categories || [] as category (category.id)}
<a href={resolve(`/categories/${category.id}`)}>
{category.name}
</a>
{/each}If I add with another component a query string on the url like ?page=2 and then I click the link the query string is not automatically removed, why?
I'm already under /categories.
Example:
- I'm on
/categories/black?page=2 - then I click on "Red"
- it goes to
/categories/red?page=2 - I expect instead:
/categories/red
Reproduction
System Info
"@sveltejs/kit": "2.48.4",
"svelte": "5.43.3"Severity
serious, but I can work around it