fix(client router): tolerant invalid hash selector typo (#506)

pull/545/head
Guanghui Cheng 3 years ago committed by GitHub
parent f7ccfb85b5
commit ffe0c40ebc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) {

Loading…
Cancel
Save