diff options
-rw-r--r-- | client/components/sidebar/sidebar.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js index 8b98fd7e..f7efb1e8 100644 --- a/client/components/sidebar/sidebar.js +++ b/client/components/sidebar/sidebar.js @@ -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() { |