diff --git a/src/client/theme-default/composables/outline.ts b/src/client/theme-default/composables/outline.ts index 666896eb..b4c9fb4a 100644 --- a/src/client/theme-default/composables/outline.ts +++ b/src/client/theme-default/composables/outline.ts @@ -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)}"]` )