Skip to content

Commit

Permalink
Fix discussion list scroll position not being maintained when hero is…
Browse files Browse the repository at this point in the history
… not visible
  • Loading branch information
tobyzerner committed Dec 2, 2018
1 parent 15e1a15 commit 40dc6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/forum/components/IndexPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 40dc6ac

Please sign in to comment.