@nuskin/ns-product-lib 2.13.0-cx24-5107.4 → 2.13.0-cx24-5107.5
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/graph-ql/product.js +7 -5
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [2.13.0-cx24-5107.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-5107.4...v2.13.0-cx24-5107.5) (2023-09-28)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
5
|
+
|
6
|
+
* single variant ([3464822](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/3464822e8b3cbdba7ba576ff19247becb00e8a73))
|
7
|
+
|
1
8
|
# [2.13.0-cx24-5107.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-5107.3...v2.13.0-cx24-5107.4) (2023-09-28)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/graph-ql/product.js
CHANGED
@@ -161,7 +161,9 @@ function mapProduct(product, market, locale, config) {
|
|
161
161
|
|
162
162
|
}
|
163
163
|
|
164
|
-
if
|
164
|
+
//map only if it is normal product
|
165
|
+
if (product.variants && !kitBundleProducts) {
|
166
|
+
console.log(variants);
|
165
167
|
productDetail.variants = mapVariants(product);
|
166
168
|
}
|
167
169
|
|
@@ -190,8 +192,8 @@ function mapProduct(product, market, locale, config) {
|
|
190
192
|
*/
|
191
193
|
function mapVariants(product) {
|
192
194
|
|
193
|
-
//return if it
|
194
|
-
if (!product.variants
|
195
|
+
//return if it has no variant
|
196
|
+
if (!product.variants) {
|
195
197
|
return [];
|
196
198
|
}
|
197
199
|
|
@@ -252,7 +254,7 @@ function mapVariants(product) {
|
|
252
254
|
"personalOffer": false,
|
253
255
|
"savedEventName": '',
|
254
256
|
"salesLabel": '',
|
255
|
-
"eventName":
|
257
|
+
"eventName": null,
|
256
258
|
"sizeWeight": '',
|
257
259
|
"nettoWeight": "",
|
258
260
|
"searchScore": 0,
|
@@ -273,7 +275,7 @@ function mapVariants(product) {
|
|
273
275
|
*/
|
274
276
|
function getPromotions(config) {
|
275
277
|
console.log(`config `, config);
|
276
|
-
return
|
278
|
+
return null;
|
277
279
|
}
|
278
280
|
|
279
281
|
/**
|