From 21e38d9e45b4c0c876e04caa57e670694264aeb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 23 Sep 2022 09:09:15 -0400 Subject: [PATCH] fix: scroll to post if theme doesn't have top navbar --- public/src/modules/navigator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js index ea2e15ad85..d30539db5b 100644 --- a/public/src/modules/navigator.js +++ b/public/src/modules/navigator.js @@ -570,7 +570,7 @@ define('navigator', ['forum/pagination', 'components', 'hooks', 'alerts'], funct await hooks.fire('filter:navigator.scroll', { scrollTo, highlight, duration, newIndex }); const postHeight = scrollTo.outerHeight(true); - const navbarHeight = components.get('navbar').outerHeight(true); + const navbarHeight = components.get('navbar').outerHeight(true) || 0; const topicHeaderHeight = $('.topic-header').outerHeight(true) || 0; const viewportHeight = $(window).height();