@nuskin/ns-product-lib 2.14.3-cx24-5962.1 → 2.14.3-cx24-5962.2

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.14.3-cx24-5962.1",
3
+ "version": "2.14.3-cx24-5962.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": {
@@ -509,7 +509,8 @@ function mapProductStatus(status) {
509
509
  function mapPromos(product, isKitBundle = false) {
510
510
  if (isKitBundle) {
511
511
  const { pricingJson } = product
512
- const promotion = pricingJson.promotion
512
+ const parsedPricing = JSON.parse(pricingJson)
513
+ const promotion = parsedPricing.promotion
513
514
  return (promotion && promotion.length >= 1) ? { message: promotion[0].message, offerId: promotion[0].offerId } : { message: '', offerId: '' }
514
515
  } else {
515
516
  return { message: product.salesLabel || product.salesText, offerId: product.salesLabel || product.salesText }