@nuskin/ns-product-lib 2.6.1-cx24-337701.8 → 2.6.1-cx24-337701.10

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [2.6.1-cx24-337701.10](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.9...v2.6.1-cx24-337701.10) (2023-03-20)
2
+
3
+
4
+ ### Fix
5
+
6
+ * The variant drop down label ([a93900f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a93900f43e880b52383ea22df8d496f97be21535))
7
+ * The variant drop down label ([20bc315](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/20bc315ba14213d5e18101c9016d3d07da14843a))
8
+ * The variant drop down label ([8bb8f1c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/8bb8f1c11626645d2cd4ca1a4db29f75b99dff7b))
9
+
10
+ ## [2.6.1-cx24-337701.9](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.8...v2.6.1-cx24-337701.9) (2023-03-20)
11
+
12
+
13
+ ### Fix
14
+
15
+ * The variant drop down label ([a35121b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a35121b96fb7d0e62119e4bebea9d513cd2e8814))
16
+
1
17
  ## [2.6.1-cx24-337701.8](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.7...v2.6.1-cx24-337701.8) (2023-03-20)
2
18
 
3
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.1-cx24-337701.8",
3
+ "version": "2.6.1-cx24-337701.10",
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": {
@@ -356,6 +356,7 @@ const ProductData = {
356
356
 
357
357
  for (const productData of productDataResponse) {
358
358
  let variants = {};
359
+
359
360
  let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
360
361
  let imageURL = product.properties.imageURL;
361
362
  const regex = /\d+\.\d+/
@@ -374,6 +375,9 @@ const ProductData = {
374
375
  return variant;
375
376
  });
376
377
 
378
+ let defaultKey = productData.sku.map(e => e.default).indexOf(true)
379
+ if (defaultKey && productData.sku.length > 1)
380
+ variants = this.moveArray(Object.values(variants), defaultKey, 0);
377
381
  }
378
382
 
379
383