Merge pull request #2609 from Trekky12/master

fix error when the sidebar is not visible
This commit is contained in:
Lauri Ojansivu 2019-08-12 20:04:28 +03:00 committed by GitHub
commit b5f74162af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,8 +47,11 @@ BlazeComponent.extendComponent({
},
calculateNextPeak() {
const altitude = this.find('.js-board-sidebar-content').scrollHeight;
this.callFirstWith(this, 'setNextPeak', altitude);
const sidebarElement = this.find('.js-board-sidebar-content');
if (sidebarElement) {
const altitude = sidebarElement.scrollHeight;
this.callFirstWith(this, 'setNextPeak', altitude);
}
},
reachNextPeak() {