Skip to content

Commit

Permalink
fix(theme): hide outline marker on scroll to top
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Aug 7, 2023
1 parent f4a5c43 commit 81e7405
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client/theme-default/composables/outline.ts
Expand Up @@ -168,7 +168,9 @@ export function useActiveAnchor(
prevActiveLink.classList.remove('active')
}

if (hash !== null) {
if (hash == null) {
prevActiveLink = null
} else {
prevActiveLink = container.value.querySelector(
`a[href="${decodeURIComponent(hash)}"]`
)
Expand Down

0 comments on commit 81e7405

Please sign in to comment.