luna-one 3.1.478 → 3.1.479
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -103,18 +103,18 @@ var ProductsPackage = function ProductsPackage(_ref) {
|
|
|
103
103
|
return card === null || card === void 0 ? void 0 : card.clientHeight;
|
|
104
104
|
}); //Find the tallest card's height
|
|
105
105
|
|
|
106
|
-
var tallestCard = cardsHeight && cardsHeight !== null && cardsHeight !== void 0 && cardsHeight.
|
|
106
|
+
var tallestCard = cardsHeight && cardsHeight !== null && cardsHeight !== void 0 && cardsHeight.length ? Math.max.apply(Math, (0, _toConsumableArray2["default"])(cardsHeight)) : null; //add all heights of cards to find the total height for mobile
|
|
107
107
|
|
|
108
108
|
var startingValue = 0;
|
|
109
109
|
var mobileHeight = cardsHeight === null || cardsHeight === void 0 ? void 0 : cardsHeight.reduce(function (previousValue, currentValue) {
|
|
110
110
|
return previousValue + currentValue;
|
|
111
111
|
}, startingValue);
|
|
112
112
|
|
|
113
|
-
if ((_cards === null || _cards === void 0 ? void 0 : _cards.length) > 3 && tallestCard > 500 && width > 600) {
|
|
113
|
+
if ((_cards === null || _cards === void 0 ? void 0 : _cards.length) > 3 && tallestCard > 500 && width > 600 && width !== 0) {
|
|
114
114
|
setHeightOfTallestCard(tallestCard + 70);
|
|
115
|
-
} else if (tallestCard > 500 && width > 600) {
|
|
115
|
+
} else if (tallestCard > 500 && width > 600 && width !== 0) {
|
|
116
116
|
setHeightOfTallestCard(tallestCard);
|
|
117
|
-
} else if (width <= 600) {
|
|
117
|
+
} else if (width <= 600 && width !== 0) {
|
|
118
118
|
var _document2, _document2$querySelec;
|
|
119
119
|
|
|
120
120
|
setHeightOfTallestCard(mobileHeight + ((_document2 = document) === null || _document2 === void 0 ? void 0 : (_document2$querySelec = _document2.querySelector(".mxp-products-package-container__right-section")) === null || _document2$querySelec === void 0 ? void 0 : _document2$querySelec.clientHeight));
|