fix: scroll to post if theme doesn't have top navbar

This commit is contained in:
Barış Soner Uşaklı
2022-09-23 09:09:15 -04:00
parent a5d4e6b68a
commit 21e38d9e45

View File

@@ -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();