@nuskin/ns-product-lib 2.7.0-cx24-3682.20 → 2.7.0-cx24-3682.21
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [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
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([d32293e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d32293e08920313b2598e6be21d66c7377713d9e)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
7
|
+
|
1
8
|
# [2.7.0-cx24-3682.20](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.19...v2.7.0-cx24-3682.20) (2023-03-28)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
@@ -48,6 +48,7 @@
|
|
48
48
|
* @property {string} identifier e.g., Normal - "blt8b757df6dcaa199c" | Kit - "02001076"
|
49
49
|
* @property {EquinoxProductProperties} properties
|
50
50
|
* @property {EquinoxProductVariant[]} sku or varaints - available only when product is a normal product.
|
51
|
+
* @property {boolean|null} [exists] indicates whethere the SKU exists or not (HTTP 404) e.g., false
|
51
52
|
*/
|
52
53
|
|
53
54
|
/**
|
@@ -11,6 +11,7 @@ function productNotFound(product, market) {
|
|
11
11
|
const model = {};
|
12
12
|
model.identifier = mapIdentifier(` ${product.identifier}`);
|
13
13
|
model.properties = mapProperties();
|
14
|
+
model.exists = mapExists(product.exists);
|
14
15
|
model.sku = [mapVariant({
|
15
16
|
// adding a whitespace allows us to display an SKU with 55
|
16
17
|
// without initializing the variant selector of ns-product-small
|
@@ -33,4 +34,15 @@ function productNotFound(product, market) {
|
|
33
34
|
return model;
|
34
35
|
}
|
35
36
|
|
37
|
+
/**
|
38
|
+
* @param {boolean|null|undefined} exists
|
39
|
+
*/
|
40
|
+
function mapExists(exists) {
|
41
|
+
if (exists === undefined) {
|
42
|
+
return null;
|
43
|
+
}
|
44
|
+
|
45
|
+
return exists;
|
46
|
+
}
|
47
|
+
|
36
48
|
module.exports = productNotFound;
|