@infrab4a/connect-angular 3.6.0-beta.12 → 3.6.0-beta.13
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.
|
@@ -1001,9 +1001,9 @@
|
|
|
1001
1001
|
.then(function (data) { return data.data; })];
|
|
1002
1002
|
case 1:
|
|
1003
1003
|
campaigns = _o.sent();
|
|
1004
|
-
if (!campaigns.length)
|
|
1005
|
-
checkout;
|
|
1006
1004
|
notGiftItems = checkout.lineItems.filter(function (item) { return !item.isGift; });
|
|
1005
|
+
if (!campaigns.length)
|
|
1006
|
+
return [2 /*return*/, Object.assign(Object.assign({}, checkout), { lineItems: notGiftItems })];
|
|
1007
1007
|
cartTotal = notGiftItems.reduce(function (a, b) { return a + b.pricePaid * b.quantity; }, 0);
|
|
1008
1008
|
elegibleCampaigns = [];
|
|
1009
1009
|
_loop_1 = function (campaign) {
|
|
@@ -1047,7 +1047,7 @@
|
|
|
1047
1047
|
finally { if (e_3) throw e_3.error; }
|
|
1048
1048
|
}
|
|
1049
1049
|
if (!elegibleCampaigns.length)
|
|
1050
|
-
return [2 /*return*/, checkout];
|
|
1050
|
+
return [2 /*return*/, Object.assign(Object.assign({}, checkout), { lineItems: notGiftItems })];
|
|
1051
1051
|
campaingnProducts = [];
|
|
1052
1052
|
_o.label = 2;
|
|
1053
1053
|
case 2:
|
|
@@ -1106,7 +1106,7 @@
|
|
|
1106
1106
|
return [7 /*endfinally*/];
|
|
1107
1107
|
case 16:
|
|
1108
1108
|
if (!campaingnProducts.length)
|
|
1109
|
-
return [2 /*return*/, checkout];
|
|
1109
|
+
return [2 /*return*/, Object.assign(Object.assign({}, checkout), { lineItems: notGiftItems })];
|
|
1110
1110
|
productArray = campaingnProducts.reduce(function (acc, curr) { return acc.reduce(function (aAcc, aCurr) { return aAcc + aCurr.price.price; }, 0) >
|
|
1111
1111
|
curr.reduce(function (cAcc, cCurr) { return cAcc + cCurr.price.price; }, 0)
|
|
1112
1112
|
? acc
|