Skip to content

Commit ffe0c40

Browse files
authored
fix(client router): tolerant invalid hash selector typo (#506)
1 parent f7ccfb8 commit ffe0c40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/app/router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function scrollTo(el: HTMLElement, hash: string, smooth = false) {
198198
let target: Element | null = null
199199

200200
try {
201-
target = el.classList.contains('.header-anchor')
201+
target = el.classList.contains('header-anchor')
202202
? el
203203
: document.querySelector(decodeURIComponent(hash))
204204
} catch (e) {

0 commit comments

Comments
 (0)