@nuskin/ns-product-lib 2.6.1-cx24-337701.12 → 2.6.1-cx24-337701.13
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/productData.js +0 -9
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [2.6.1-cx24-337701.13](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.12...v2.6.1-cx24-337701.13) (2023-03-20)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
5
|
+
|
6
|
+
* multi variant drop down ([4c61780](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/4c617806a2934b1aca7b5280810107cf0356b29b))
|
7
|
+
|
1
8
|
## [2.6.1-cx24-337701.12](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-337701.11...v2.6.1-cx24-337701.12) (2023-03-20)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -343,11 +343,6 @@ const ProductData = {
|
|
343
343
|
}
|
344
344
|
},
|
345
345
|
|
346
|
-
moveArray: function (arr, from, to) {
|
347
|
-
arr.splice(to, 0, arr.splice(from, 1)[0]);
|
348
|
-
return { arr };
|
349
|
-
},
|
350
|
-
|
351
346
|
|
352
347
|
eqProductMapper: async function (productDataResponse, skus) {
|
353
348
|
// console.log(productDataResponse, skus);
|
@@ -374,10 +369,6 @@ const ProductData = {
|
|
374
369
|
variants[variant.identifier] = this.eqProductVariantMapper(variant);
|
375
370
|
return variant;
|
376
371
|
});
|
377
|
-
|
378
|
-
let defaultKey = productData.sku.map(e => e.default).indexOf(true)
|
379
|
-
if (defaultKey)
|
380
|
-
variants = this.moveArray(Object.values(variants), defaultKey, 0);
|
381
372
|
}
|
382
373
|
|
383
374
|
|