summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTobias <thaegi@gmx.de>2019-08-12 17:24:53 +0200
committerTobias <thaegi@gmx.de>2019-08-12 17:24:53 +0200
commit446e29e42244b33d83947eb0e2852c2926626325 (patch)
tree4d8ce64f533e9cd444705a799aa90b24895c210f /client
parentdb1cf5bb64f10317742361637d239f08bec141b8 (diff)
downloadwekan-446e29e42244b33d83947eb0e2852c2926626325.tar.gz
wekan-446e29e42244b33d83947eb0e2852c2926626325.tar.bz2
wekan-446e29e42244b33d83947eb0e2852c2926626325.zip
fix error when the sidebar is not visible
Diffstat (limited to 'client')
-rw-r--r--client/components/sidebar/sidebar.js7
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() {