diff --git a/components/starlight/StarlightConnector.astro b/components/starlight/StarlightConnector.astro index 6a6b36c..7c4491b 100644 --- a/components/starlight/StarlightConnector.astro +++ b/components/starlight/StarlightConnector.astro @@ -51,7 +51,7 @@ export interface Props {} document .querySelectorAll('[aria-current="page"]') ?.forEach((el) => el.removeAttribute('aria-current')); - const currentPage = e.newDocument.querySelector( + const currentPage = document.querySelector( `${STARLIGHT_SIDEBAR_CONTENT} a[href="${e.to.pathname}"]` ); currentPage?.setAttribute('aria-current', 'page');