@nuskin/ns-product-lib 2.17.1-cx24-67682.2 → 2.17.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.17.1-cx24-67682.2",
3
+ "version": "2.17.1",
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": {
@@ -441,7 +441,7 @@ function mapChildSKU(kitBundleProducts) {
441
441
  return kitBundleProducts.kitProducts.map((kitProduct) => {
442
442
  const { product } = kitProduct;
443
443
  if (product.variants.length > 1) {
444
- for (const variant of product.variants) {
444
+ return product.variants.map((variant) => {
445
445
  return {
446
446
  productId: product.id,
447
447
  skuId: variant.sku,
@@ -455,7 +455,7 @@ function mapChildSKU(kitBundleProducts) {
455
455
  backOrderedQty: variant.availableQuantity
456
456
  }
457
457
  }
458
- }
458
+ })
459
459
  } else {
460
460
  const defaultVariant = product.variants[0];
461
461
  return {
@@ -472,7 +472,7 @@ function mapChildSKU(kitBundleProducts) {
472
472
  }
473
473
 
474
474
  }
475
- });
475
+ }).flat();
476
476
  }
477
477
 
478
478
  /**