@nuskin/ns-product-lib 2.11.0-cx24-5092.30 → 2.11.0-cx24-5092.31
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/productGraphQL.js +2 -3
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [2.11.0-cx24-5092.31](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.11.0-cx24-5092.30...v2.11.0-cx24-5092.31) (2023-09-18)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* Moving from AEM to CS for EQ markets ([77e895c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/77e895ca4b673f40bdb4e426dfa3323d5f341fdc))
|
7
|
+
|
1
8
|
# [2.11.0-cx24-5092.30](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.11.0-cx24-5092.29...v2.11.0-cx24-5092.30) (2023-09-18)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/productGraphQL.js
CHANGED
@@ -102,13 +102,12 @@ const ProductGraphQL = {
|
|
102
102
|
mapResponseToProduct: async function (response, market, locale, config) {
|
103
103
|
//console.log('RESPONSE ' + JSON.stringify(response))
|
104
104
|
let res;
|
105
|
-
if (response.variants
|
105
|
+
if (response.variants.length >= 1) {
|
106
106
|
res = await this.mapProductRegular(response, market, locale, config)
|
107
107
|
const productID = (response.id) ? response.id : response.variants[0].id
|
108
108
|
const promotions = await this.getProductPromotions(response.variants[0].sku, productID, config, locale)
|
109
109
|
console.log(promotions)
|
110
|
-
}
|
111
|
-
if (typeof response.bundle === 'object') {
|
110
|
+
} else if (typeof response.bundle === 'object' && response.bundle.id) {
|
112
111
|
res = await this.mapProductBundle(response, market.locale, config)
|
113
112
|
}
|
114
113
|
|