@infrab4a/connect-angular 3.10.0-beta.4 → 3.10.0-beta.6
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.
|
@@ -423,9 +423,9 @@
|
|
|
423
423
|
return __generator(this, function (_c) {
|
|
424
424
|
if (!coupon)
|
|
425
425
|
throw 'Cupom inválido.';
|
|
426
|
-
if ((coupon === null || coupon === void 0 ? void 0 : coupon.beginAt) && (coupon === null || coupon === void 0 ? void 0 : coupon.beginAt) > new Date())
|
|
426
|
+
if ((coupon === null || coupon === void 0 ? void 0 : coupon.beginAt) && (coupon === null || coupon === void 0 ? void 0 : coupon.beginAt.getTime()) > new Date().getTime())
|
|
427
427
|
throw 'Cupom inválido.';
|
|
428
|
-
if ((coupon === null || coupon === void 0 ? void 0 : coupon.expiresIn) && (coupon === null || coupon === void 0 ? void 0 : coupon.expiresIn) < new Date())
|
|
428
|
+
if ((coupon === null || coupon === void 0 ? void 0 : coupon.expiresIn) && (coupon === null || coupon === void 0 ? void 0 : coupon.expiresIn.getTime()) < new Date().getTime())
|
|
429
429
|
throw 'Cupom expirado.';
|
|
430
430
|
isInShop = coupon.shopAvailability === i3.Shops.ALL || coupon.shopAvailability === this.defaultShop;
|
|
431
431
|
if (!isInShop)
|