summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/cardDetails.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index bfe9f755..f6cd4140 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -8,8 +8,11 @@ BlazeComponent.extendComponent({
},
calculateNextPeak() {
- const altitude = this.find('.js-card-details').scrollHeight;
- this.callFirstWith(this, 'setNextPeak', altitude);
+ const cardElement = this.find('.js-card-details');
+ if (cardElement) {
+ const altitude = cardElement.scrollHeight;
+ this.callFirstWith(this, 'setNextPeak', altitude);
+ }
},
reachNextPeak() {
@@ -21,6 +24,7 @@ BlazeComponent.extendComponent({
this.isLoaded = new ReactiveVar(false);
this.parentComponent().showOverlay.set(true);
this.parentComponent().mouseHasEnterCardDetails = false;
+ this.calculateNextPeak();
},
scrollParentContainer() {