@nuskin/ns-product-lib 2.10.0-cx24-4696.2 → 2.10.0-cx24-4696.3

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.10.0-cx24-4696.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.0-cx24-4696.2...v2.10.0-cx24-4696.3) (2023-07-28)
2
+
3
+
4
+ ### New
5
+
6
+ * Support for bundles ([98a77ca](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/98a77ca4cc7792fe7cfdf85097fc36b65f32a5c3))
7
+
1
8
  # [2.10.0-cx24-4696.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.0-cx24-4696.1...v2.10.0-cx24-4696.2) (2023-07-27)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.10.0-cx24-4696.2",
3
+ "version": "2.10.0-cx24-4696.3",
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": {
@@ -325,7 +325,6 @@ const ProductData = {
325
325
  * @returns {obj} promotion
326
326
  */
327
327
  getEqProductPromotions(product) {
328
- let defaultProductPrice;
329
328
 
330
329
  if (!Array.isArray(product.promotion)) {
331
330
  return {
@@ -335,11 +334,9 @@ const ProductData = {
335
334
  eventName: null
336
335
  }
337
336
  }
338
- if (product.type === "bundle") {
339
- defaultProductPrice = product.totalValue ? product.totalValue.priceFacets["Regular Price"] : 0;
340
- } else {
341
- defaultProductPrice = product.totalValue ? product.totalValue.originalPrice : 0;
342
- }
337
+
338
+ const defaultProductPrice = product.totalValue ? product.totalValue.originalPrice : 0;
339
+
343
340
  const computedPrice = product.totalValue && product.totalValue.priceAfterDiscount
344
341
  ? product.totalValue.priceAfterDiscount
345
342
  : 0;