Skip to content

Commit

Permalink
bug fix for updateCurrentPageMarker
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Apr 9, 2024
1 parent 61a3ebc commit 614712e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/starlight/StarlightConnector.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 614712e

Please sign in to comment.