diff --git a/src/app/layout/Menu.svelte b/src/app/layout/Menu.svelte index 9138832..1e0172e 100644 --- a/src/app/layout/Menu.svelte +++ b/src/app/layout/Menu.svelte @@ -66,11 +66,6 @@ }); onMount(() => { - updateActiveNavPath(); - // the mutation observer callback runs too fast, hence the call to `updateActiveNavPath` must be wrapped in an empty - // setTimeout to not cause any visual bugs - new MutationObserver(() => setTimeout(updateActiveNavPath)).observe(document.head, { childList: true }); - document.addEventListener('astro:page-load', () => { pageLoadTimestamp = Date.now(); @@ -88,6 +83,8 @@ document.body.addEventListener('touchstart', touchStartListener); document.body.addEventListener('touchend', touchEndListener); + + updateActiveNavPath(); }); });