We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fe1d5e commit 864feeaCopy full SHA for 864feea
packages/ds-svelte-community/src/routes/+layout.svelte
@@ -19,6 +19,11 @@
19
}
20
21
let showSidebar = $state(false);
22
+
23
+ function compare(id: string | null, a: string) {
24
+ const testID = a.replace(/\/+$/, "");
25
+ return id === testID || (id == "/" && testID == "");
26
+ }
27
</script>
28
29
<Page background="bg-subtle">
@@ -52,7 +57,7 @@
52
57
<!-- eslint-disable-next-line svelte/valid-compile using $ to access stores currently errors the validator -->
53
58
<a
54
59
class="unstyled"
55
- class:active={page.url.pathname == href}
60
+ class:active={compare(page.route.id, href)}
56
61
href={base + href}
62
data-sveltekit-preload-data="tap"
63
>
0 commit comments