From b75b8572c5adfdecb9ac09274b6c2560d92155b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 5 Sep 2021 23:40:20 +0200 Subject: [PATCH] menu: avoid console log on landing page #79 --- static/js/relearn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/relearn.js b/static/js/relearn.js index 78645bc4c5..55b2ea46cc 100644 --- a/static/js/relearn.js +++ b/static/js/relearn.js @@ -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', });