@moonbase.sh/storefront-api 0.4.60 → 0.4.62
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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1489,7 +1489,7 @@ var OfferUtils = class _OfferUtils {
|
|
|
1489
1489
|
static relevantTargets(offer, cartItems) {
|
|
1490
1490
|
if (Array.isArray(offer.target)) {
|
|
1491
1491
|
const allOwned = offer.target.every((i) => i.owned);
|
|
1492
|
-
return offer.target.filter((i) => (allOwned || !i.owned) && cartItems.
|
|
1492
|
+
return offer.target.filter((i) => (allOwned || !i.owned) && !cartItems.some((l) => l.type === i.type && l.id === (l.type === "Product" ? l.productId : l.bundleId)));
|
|
1493
1493
|
}
|
|
1494
1494
|
return [offer.target];
|
|
1495
1495
|
}
|
package/dist/index.js
CHANGED
|
@@ -1433,7 +1433,7 @@ var OfferUtils = class _OfferUtils {
|
|
|
1433
1433
|
static relevantTargets(offer, cartItems) {
|
|
1434
1434
|
if (Array.isArray(offer.target)) {
|
|
1435
1435
|
const allOwned = offer.target.every((i) => i.owned);
|
|
1436
|
-
return offer.target.filter((i) => (allOwned || !i.owned) && cartItems.
|
|
1436
|
+
return offer.target.filter((i) => (allOwned || !i.owned) && !cartItems.some((l) => l.type === i.type && l.id === (l.type === "Product" ? l.productId : l.bundleId)));
|
|
1437
1437
|
}
|
|
1438
1438
|
return [offer.target];
|
|
1439
1439
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.62",
|
|
5
5
|
"description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|