From 614712ec5975d53576c7a2af5010a7da0e4233f6 Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Tue, 9 Apr 2024 20:22:48 +0200 Subject: [PATCH] bug fix for updateCurrentPageMarker --- components/starlight/StarlightConnector.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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');