Skip to content

Commit 81e7405

Browse files
committedAug 7, 2023
fix(theme): hide outline marker on scroll to top
1 parent f4a5c43 commit 81e7405

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/client/theme-default/composables/outline.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ export function useActiveAnchor(
168168
prevActiveLink.classList.remove('active')
169169
}
170170

171-
if (hash !== null) {
171+
if (hash == null) {
172+
prevActiveLink = null
173+
} else {
172174
prevActiveLink = container.value.querySelector(
173175
`a[href="${decodeURIComponent(hash)}"]`
174176
)

0 commit comments

Comments
 (0)
Please sign in to comment.