mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-29 18:48:14 +08:00
fix js error
This commit is contained in:
parent
cd7a44f651
commit
c773b71832
@ -35,8 +35,9 @@ function scrollActiveSidebar () {
|
||||
highlight()
|
||||
|
||||
function scrollIntoView () {
|
||||
var id = window.location.hash.slice(1)
|
||||
var section = document.querySelector('#' + id)
|
||||
const id = window.location.hash.slice(1)
|
||||
if (!id) return
|
||||
const section = document.querySelector('#' + id)
|
||||
|
||||
if (section) section.scrollIntoView()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user