@nuskin/ns-product-lib 2.13.0-cx24-100723.1 → 2.13.0-cx24-100723.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [2.13.0-cx24-100723.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-100723.1...v2.13.0-cx24-100723.2) (2023-10-07)
2
+
3
+
4
+ ### New
5
+
6
+ * Handle adding variants from bundle ([a6ae5ac](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a6ae5ac1f1e5c3b68c11f54a22d9db000f6222d3))
7
+ * Handle adding variants from bundle ([8499d68](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/8499d6818cfbd2526da23dea42fd89e288d52ff3))
8
+
1
9
  # [2.13.0-cx24-100723.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.12.0...v2.13.0-cx24-100723.1) (2023-10-07)
2
10
 
3
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.13.0-cx24-100723.1",
3
+ "version": "2.13.0-cx24-100723.2",
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": {
@@ -11,7 +11,12 @@ function childSKUBundle(kits, product, identifier) {
11
11
  let sku;
12
12
  let personalOffer = sessionStorage.getItem('personalOffer')
13
13
  if (personalOffer.active) {
14
- sku = personalOffer.products.map(product => product.sku == identifier)
14
+ const skuAdd = personalOffer.products.filter((p) => {
15
+ return p.sku === identifier
16
+ })
17
+ sku = product.sku.filter((sku) => {
18
+ return sku.identifier == skuAdd[0].variantSelected
19
+ })[0]
15
20
  } else {
16
21
  sku = product.sku.filter(sku => sku.default)[0];
17
22
  }