From 4365fa3c52d319eeeffe75b02279e7f2ab15c3e4 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 3 Dec 2018 08:50:54 +1030 Subject: [PATCH] Fix discussion list scroll position not being maintained when hero is not visible --- framework/core/js/src/forum/components/IndexPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/src/forum/components/IndexPage.js b/framework/core/js/src/forum/components/IndexPage.js index 014e486c1..5970394a6 100644 --- a/framework/core/js/src/forum/components/IndexPage.js +++ b/framework/core/js/src/forum/components/IndexPage.js @@ -102,7 +102,7 @@ export default class IndexPage extends Page { // previous hero. Maintain the same scroll position relative to the bottom // of the hero so that the sidebar doesn't jump around. const oldHeroHeight = app.cache.heroHeight; - const heroHeight = app.cache.heroHeight = this.$('.Hero').outerHeight(); + const heroHeight = app.cache.heroHeight = this.$('.Hero').outerHeight() || 0; const scrollTop = app.cache.scrollTop; $('#app').css('min-height', $(window).height() + heroHeight);