@nuskin/ns-product-lib 2.17.5 → 2.17.7-cx24-7022.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.17.5",
3
+ "version": "2.17.7-cx24-7022.1",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -124,7 +124,7 @@ async function getProducts(ids, market, locale, config) {
124
124
  });
125
125
  productsData.count = productsData.products.length;
126
126
  } catch (e) {
127
- console.log(`Unable to fetch products details for SKUs ${ids}`);
127
+ console.log(`Unable to fetch products details for SKUs ${ids} ${e}`);
128
128
  }
129
129
 
130
130
  return {
package/src/product.js CHANGED
@@ -393,7 +393,7 @@ const Product = function (productData) {
393
393
  Object.keys(this.priceMap).forEach(priceTypeKey => {
394
394
  const eventPriceType = priceTypeKey.substring(0, priceTypeKey.indexOf(`-${this.priceType}`));
395
395
 
396
- if (eventPriceType) {
396
+ if (eventPriceType && this.priceMap[eventPriceType]) {
397
397
  eventPriceTypes.push(eventPriceType);
398
398
  }
399
399
  });