@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.
@@ -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
- var discounts = new Map(Object.entries(discounts_));
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [