diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-06-18 02:18:58 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-06-18 02:18:58 +0300 |
commit | 3f0fddf448bd64dc7fc92cbe4b005eac4c517e55 (patch) | |
tree | 5dc9343e697a9e275629924eb619c818792476bc | |
parent | afe00d02cddf016a3ccc1ed9a98a7f10d3339f26 (diff) | |
parent | f1e103b082e1a94126ebdd5085c2aaad27a48abc (diff) | |
download | wekan-3f0fddf448bd64dc7fc92cbe4b005eac4c517e55.tar.gz wekan-3f0fddf448bd64dc7fc92cbe4b005eac4c517e55.tar.bz2 wekan-3f0fddf448bd64dc7fc92cbe4b005eac4c517e55.zip |
Merge branch 'marc1006-mobile_fix'
-rw-r--r-- | client/components/activities/activities.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index edfaab2a..83843d1d 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -7,8 +7,9 @@ BlazeComponent.extendComponent({ // XXX Should we use ReactiveNumber? this.page = new ReactiveVar(1); this.loadNextPageLocked = false; + // TODO is sidebar always available? E.g. on small screens/mobile devices const sidebar = Sidebar; - sidebar.callFirstWith(null, 'resetNextPeak'); + sidebar && sidebar.callFirstWith(null, 'resetNextPeak'); this.autorun(() => { let mode = this.data().mode; const capitalizedMode = Utils.capitalize(mode); @@ -29,6 +30,8 @@ BlazeComponent.extendComponent({ this.subscribe('activities', mode, searchId, limit, hideSystem, () => { this.loadNextPageLocked = false; + // TODO the guard can be removed as soon as the TODO above is resolved + if (!sidebar) return; // If the sibear peak hasn't increased, that mean that there are no more // activities, and we can stop calling new subscriptions. // XXX This is hacky! We need to know excatly and reactively how many |