Skip to content

Commit

Permalink
make callback name consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
zqianem committed May 11, 2024
1 parent fdc171f commit 304421f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/theme-default/composables/outline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export function useActiveAnchor(
onMounted(() => {
requestAnimationFrame(setActiveLink)
window.addEventListener('scroll', onScroll)
container.value.addEventListener('click', handleClick)
container.value.addEventListener('click', onClick)
})

onUpdated(() => {
Expand All @@ -132,10 +132,10 @@ export function useActiveAnchor(

onUnmounted(() => {
window.removeEventListener('scroll', onScroll)
container.value.removeEventListener('click', handleClick)
container.value.removeEventListener('click', onClick)
})

function handleClick(e: MouseEvent) {
function onClick(e: MouseEvent) {
if (!isAsideEnabled.value || !(e.target instanceof HTMLAnchorElement)) {
return
}
Expand Down

0 comments on commit 304421f

Please sign in to comment.