@nuskin/ns-product-lib 2.13.0-cx24-100723.8 → 2.13.0-cx24-100723.9

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.9](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-100723.8...v2.13.0-cx24-100723.9) (2023-10-11)
2
+
3
+
4
+ ### New
5
+
6
+ * Handle adding variants from bundle ([8aa1970](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/8aa19706f7d5da80a9bded7145bd8d2934bbe189))
7
+ * Handle adding variants from bundle ([146ddc3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/146ddc369e726e010b533e2cc5d1eea3727fdfd6))
8
+
1
9
  # [2.13.0-cx24-100723.8](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-100723.7...v2.13.0-cx24-100723.8) (2023-10-10)
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.8",
3
+ "version": "2.13.0-cx24-100723.9",
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": {
@@ -15,7 +15,7 @@ function childSKUBundle(kits, product) {
15
15
  const productWithVariant = personalOffer.products.filter((sku) => sku.variantSelected !== null)[0]
16
16
  if (productWithVariant !== null) {
17
17
  sku = product.sku.filter((sku) => {
18
- console.log('Checking sku ' + sku)
18
+ console.log('Checking sku ' + sku.identifier + ` ` + product.identifier)
19
19
  return sku.identifier === productWithVariant.variantSelected[product.identifier]
20
20
  })[0]
21
21
  } else {
@@ -27,7 +27,7 @@ function childSKUBundle(kits, product) {
27
27
 
28
28
 
29
29
  if (!sku) {
30
- throw Error('Unable to find the default SKU.');
30
+ throw Error('Unable to find the default SKU for product ' + product.identifier);
31
31
  }
32
32
 
33
33
  const kit = kits.filter(k => k.sku === product.identifier)[0];