mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
fix js error
This commit is contained in:
+3
-2
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user