diff --git a/src/lib/holocene/navigation/navigation-item.svelte b/src/lib/holocene/navigation/navigation-item.svelte index a85789b9d..944d3c01b 100644 --- a/src/lib/holocene/navigation/navigation-item.svelte +++ b/src/lib/holocene/navigation/navigation-item.svelte @@ -13,10 +13,11 @@ export let external = false; export let animate = false; export let disabled = false; - export let isActive: (path: string) => boolean = () => false; + export let isActive: (path: string) => boolean | undefined = undefined; $: rel = external ? 'noopener noreferrer' : ''; $: target = external ? '_blank' : ''; + $: active = isActive && isActive($page.url.href);