@infrab4a/connect-angular 2.0.6 → 2.0.7
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.
|
@@ -521,7 +521,6 @@
|
|
|
521
521
|
return [4 /*yield*/, this.hasProductCategories(coupon, checkout)];
|
|
522
522
|
case 3:
|
|
523
523
|
hasProductCategories = _d.sent();
|
|
524
|
-
// Se não tem produtos elegíveis, retorna erro
|
|
525
524
|
if (!hasProductCategories)
|
|
526
525
|
throw 'Seu carrinho não possui produtos elegíveis para desconto.';
|
|
527
526
|
return [2 /*return*/, coupon];
|
|
@@ -625,7 +624,7 @@
|
|
|
625
624
|
return __generator(this, function (_d) {
|
|
626
625
|
switch (_d.label) {
|
|
627
626
|
case 0:
|
|
628
|
-
if (!coupon.productsCategories
|
|
627
|
+
if (!coupon.productsCategories || !coupon.productsCategories.length) {
|
|
629
628
|
return [2 /*return*/, true];
|
|
630
629
|
}
|
|
631
630
|
return [4 /*yield*/, this.getCouponCategoriesId(coupon)];
|