@nuskin/ns-product-lib 2.7.0-cx24-3682.21 → 2.7.0-cx24-3682.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.7.0-cx24-3682.23](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.22...v2.7.0-cx24-3682.23) (2023-03-29)
2
+
3
+
4
+ ### New
5
+
6
+ * MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([c99dead](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/c99deaddf1461f1d527153b92347b004ec2b6a3b)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
7
+
8
+ # [2.7.0-cx24-3682.22](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.21...v2.7.0-cx24-3682.22) (2023-03-29)
9
+
10
+
11
+ ### New
12
+
13
+ * MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([48ae327](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/48ae3270473b3951c41580ec304f688fd3b1bf81)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
14
+
1
15
  # [2.7.0-cx24-3682.21](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.20...v2.7.0-cx24-3682.21) (2023-03-28)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.7.0-cx24-3682.21",
3
+ "version": "2.7.0-cx24-3682.23",
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": {
@@ -465,7 +465,7 @@ const ProductData = {
465
465
  "equinoxProductId": productData.identifier,
466
466
  equinox: {
467
467
  sku: {
468
- exists: productData.exists ? productData.exists : false
468
+ exists: this.mapEquinoxSKUExists(productData.exists)
469
469
  }
470
470
  }
471
471
  };
@@ -491,6 +491,21 @@ const ProductData = {
491
491
  };
492
492
  },
493
493
 
494
+ mapEquinoxSKUExists: function(exists) {
495
+ // this could be avoided if only we are using response mapper
496
+ // for equinox products that exists.
497
+ // @todo: clean-up
498
+ if (exists === undefined) {
499
+ return null;
500
+ }
501
+
502
+ if (exists === false) {
503
+ return false;
504
+ }
505
+
506
+ return true;
507
+ },
508
+
494
509
  /**
495
510
  * fetchChildSkus make requests to Equinox to get the SKUs of a kit.
496
511
  * @param {*} product