@nuskin/ns-product-lib 2.6.1-cx24-337701.4 → 2.6.1-cx24-337701.6

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [2.6.1-cx24-337701.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.5...v2.6.1-cx24-337701.6) (2023-03-20)
2
+
3
+
4
+ ### Fix
5
+
6
+ * The variant drop down label ([738b2a4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/738b2a41ab2fc2900529234b3fa860f9102fc36d))
7
+ * The variant drop down label ([58af789](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/58af78921e2eff83beffd6b5665aff6d60bbb21b))
8
+
9
+ ## [2.6.1-cx24-337701.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.4...v2.6.1-cx24-337701.5) (2023-03-19)
10
+
11
+
12
+ ### Fix
13
+
14
+ * The variant drop down label ([2e175c1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/2e175c12f24b789f913e64fff5e26b3257ccd087))
15
+
1
16
  ## [2.6.1-cx24-337701.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.3...v2.6.1-cx24-337701.4) (2023-03-19)
2
17
 
3
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.1-cx24-337701.4",
3
+ "version": "2.6.1-cx24-337701.6",
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": {
@@ -352,10 +352,10 @@ const ProductData = {
352
352
  eqProductMapper: async function (productDataResponse, skus) {
353
353
  // console.log(productDataResponse, skus);
354
354
  let count = 0;
355
- let variants = {};
356
355
  const products = [];
357
356
 
358
357
  for (const productData of productDataResponse) {
358
+ let variants = {};
359
359
  let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
360
360
  let imageURL = product.properties.imageURL;
361
361
  const regex = /\d+\.\d+/
@@ -374,9 +374,9 @@ const ProductData = {
374
374
  return variant;
375
375
  });
376
376
 
377
- let defaultKey = productData.sku.map(e => e.default).indexOf(true);
377
+ let defaultKey = productData.sku.map(e => e.default).indexOf(true)
378
378
  if (defaultKey)
379
- variants = this.moveArray(variants, defaultKey, 0);
379
+ variants = this.moveArray(Object.values(variants), defaultKey, 0);
380
380
 
381
381
  }
382
382