@kiminix/tp-client 1.18.0 → 1.19.0
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.
- package/dist/utils/menu-utils.js +2 -3
- package/package.json +1 -1
package/dist/utils/menu-utils.js
CHANGED
|
@@ -13,8 +13,7 @@ var MenuUtils = /** @class */ (function () {
|
|
|
13
13
|
var _a;
|
|
14
14
|
// correct way to get daily discounts Map instance
|
|
15
15
|
var discounts_ = (_a = menu.discount) !== null && _a !== void 0 ? _a : {};
|
|
16
|
-
|
|
17
|
-
return discounts;
|
|
16
|
+
return new Map(Object.entries(discounts_));
|
|
18
17
|
};
|
|
19
18
|
MenuUtils.getAvailableDiscounts = function (menu) {
|
|
20
19
|
var discounts = this.getDiscounts(menu);
|
|
@@ -38,7 +37,7 @@ var MenuUtils = /** @class */ (function () {
|
|
|
38
37
|
};
|
|
39
38
|
MenuUtils.getAvailableDiscountByDay = function (menu, date) {
|
|
40
39
|
var discount = this.getDiscountByDay(menu, date);
|
|
41
|
-
return discount.isAvailable ? discount : undefined;
|
|
40
|
+
return (discount === null || discount === void 0 ? void 0 : discount.isAvailable) ? discount : undefined;
|
|
42
41
|
};
|
|
43
42
|
MenuUtils.getDiscountByDay = function (menu, date) {
|
|
44
43
|
// correct way to get daily discount Map instance
|