@nuskin/ns-product-lib 2.13.0-cx24-100723.5 → 2.13.0-cx24-100723.6
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.13.0-cx24-100723.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-100723.5...v2.13.0-cx24-100723.6) (2023-10-10)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* Handle adding variants from bundle ([b838f7a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/b838f7a55c7757e0aa060c3f2ee49a5b52f56731))
|
7
|
+
|
1
8
|
# [2.13.0-cx24-100723.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-100723.4...v2.13.0-cx24-100723.5) (2023-10-10)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
@@ -13,10 +13,13 @@ function childSKUBundle(kits, product) {
|
|
13
13
|
if (personalOffer.active) {
|
14
14
|
//get the products with variants selected
|
15
15
|
const productWithVariant = personalOffer.products.filter((sku) => sku.variantSelected !== null)[0]
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
if (productWithVariant.length) {
|
17
|
+
sku = product.sku.filter((sku) => {
|
18
|
+
return sku.identifier == productWithVariant.variantSelected[product.identifier]
|
19
|
+
})[0]
|
20
|
+
} else {
|
21
|
+
sku = product.sku.filter(sku => sku.default)[0];
|
22
|
+
}
|
20
23
|
} else {
|
21
24
|
sku = product.sku.filter(sku => sku.default)[0];
|
22
25
|
}
|