@nuskin/ns-product-lib 2.6.0-cx24-3377.11 → 2.6.0-cx24-3377.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/product.js +1 -2
- package/src/productData.js +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [2.6.0-cx24-3377.12](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.11...v2.6.0-cx24-3377.12) (2023-03-10)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* Fix multiple variants not loading properly (CX24-3377) ([b66be37](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/b66be37163a64c6fcc0d763b748a653d3fc0ebb9))
|
7
|
+
* Fix multiple variants not loading properly (CX24-3377) ([10821f1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/10821f1924f5f0d7b985af15d382948e99592e42))
|
8
|
+
|
1
9
|
# [2.6.0-cx24-3377.11](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.10...v2.6.0-cx24-3377.11) (2023-03-10)
|
2
10
|
|
3
11
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -430,8 +430,7 @@ const Product = function (productData) {
|
|
430
430
|
this.isBase = function () {
|
431
431
|
if (this.equinoxProductId != "") {
|
432
432
|
console.log(this.variants)
|
433
|
-
|
434
|
-
return (Object.keys(this.variants).length) ? true : false
|
433
|
+
return (Object.keys(this.variants).length && this.sku == Object.keys(this.variants)[0]) ? true : false
|
435
434
|
}
|
436
435
|
return this.sku.substring(2, 4) === "55";
|
437
436
|
};
|
package/src/productData.js
CHANGED
@@ -28,8 +28,6 @@ const ProductData = {
|
|
28
28
|
|
29
29
|
getProductFromEquinox: async function (skus, locale, config) {
|
30
30
|
const filter = `{"filters": [{"field": "index_key_skuId","operation": "IN", "value": "${skus.toString()}"}]}`;
|
31
|
-
axios.defaults.withCredentials = true;
|
32
|
-
|
33
31
|
const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
|
34
32
|
const href = `${url}?filter=${encodeURI(filter)}`;
|
35
33
|
const response = await axios.request({
|
@@ -40,7 +38,9 @@ const ProductData = {
|
|
40
38
|
storeId: config.store_id
|
41
39
|
},
|
42
40
|
headers: this.getEquinoxRequestHeaders(),
|
43
|
-
responseType: 'json'
|
41
|
+
responseType: 'json',
|
42
|
+
withCredentials: true
|
43
|
+
|
44
44
|
});
|
45
45
|
|
46
46
|
if (response.data.product) {
|