menu: avoid console log on landing page #79

This commit is contained in:
Sören Weber 2021-09-05 23:40:20 +02:00
parent 40fec76fae
commit b75b8572c5
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -114,7 +114,7 @@ function initMermaid() {
function scrollToActiveMenu() {
window.setTimeout(function(){
var e = $("#sidebar ul.topics li.active")[0];
if( e.scrollIntoView ){
if( e && e.scrollIntoView ){
e.scrollIntoView({
block: 'center',
});