Skip to content

Commit

Permalink
fix(client router): tolerant invalid hash selector typo (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericteen committed Feb 22, 2022
1 parent f7ccfb8 commit ffe0c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/app/router.ts
Expand Up @@ -198,7 +198,7 @@ function scrollTo(el: HTMLElement, hash: string, smooth = false) {
let target: Element | null = null

try {
target = el.classList.contains('.header-anchor')
target = el.classList.contains('header-anchor')
? el
: document.querySelector(decodeURIComponent(hash))
} catch (e) {
Expand Down

0 comments on commit ffe0c40

Please sign in to comment.