fix js error
This commit is contained in:
parent
cd7a44f651
commit
c773b71832
1 changed files with 3 additions and 2 deletions
|
|
@ -35,8 +35,9 @@ function scrollActiveSidebar () {
|
||||||
highlight()
|
highlight()
|
||||||
|
|
||||||
function scrollIntoView () {
|
function scrollIntoView () {
|
||||||
var id = window.location.hash.slice(1)
|
const id = window.location.hash.slice(1)
|
||||||
var section = document.querySelector('#' + id)
|
if (!id) return
|
||||||
|
const section = document.querySelector('#' + id)
|
||||||
|
|
||||||
if (section) section.scrollIntoView()
|
if (section) section.scrollIntoView()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue