fix(client router): tolerant invalid hash selector typo

pull/506/head
eric_cheng 4 years ago
parent 45b65ce8b6
commit ef3151eec7

@ -185,7 +185,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