@nuskin/cs-product-lib 1.4.1 → 1.4.2-pa-83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/helpers.js +12 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/cs-product-lib",
3
- "version": "1.4.1",
3
+ "version": "1.4.2-pa-83.1",
4
4
  "description": "Library for pulling and parsing product content (and applying business logic) retrieved from Contentstack",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/helpers.js CHANGED
@@ -476,32 +476,22 @@ function mapPoints(parent) {
476
476
  subscription: {
477
477
  cv:
478
478
  _.get(parent, 'points.subscription.cv', null) ||
479
- _.get(
480
- parent,
481
- 'defaults.status.pricing.wholesale.WADW.cv',
482
- null
483
- ) ||
484
- _.get(
485
- parent,
486
- 'defaults.status.pricing.wholesale.ADR5.cv',
487
- null
488
- ),
479
+ _.get(parent, 'defaults.status.pricing.wholesale.WADW.cv', null) ||
480
+ _.get(parent, 'defaults.status.pricing.wholesale.ADR5.cv', null) ||
481
+ _.get(parent, 'defaults.status.pricing.wholesale.adr.cv', null) ||
482
+ _.get(parent, 'defaults.status.pricing.wholesale.webAdr.cv', null),
489
483
  pv:
490
484
  _.get(parent, 'points.subscription.pv', null) ||
491
- _.get(
492
- parent,
493
- 'defaults.status.pricing.wholesale.WADW.pv',
494
- null
495
- ) ||
496
- _.get(parent, 'defaults.status.pricing.wholesale.ADR5.pv', null),
485
+ _.get(parent, 'defaults.status.pricing.wholesale.WADW.pv', null) ||
486
+ _.get(parent, 'defaults.status.pricing.wholesale.ADR5.pv', null) ||
487
+ _.get(parent, 'defaults.status.pricing.wholesale.adr.pv', null) ||
488
+ _.get(parent, 'defaults.status.pricing.wholesale.webAdr.pv', null),
497
489
  sb:
498
490
  _.get(parent, 'points.subscription.SB', null) ||
499
- _.get(
500
- parent,
501
- 'defaults.status.pricing.wholesale.WADW.SB',
502
- null
503
- ) ||
504
- _.get(parent, 'defaults.status.pricing.wholesale.ADR5.SB', null),
491
+ _.get(parent, 'defaults.status.pricing.wholesale.WADW.SB', null) ||
492
+ _.get(parent, 'defaults.status.pricing.wholesale.ADR5.SB', null) ||
493
+ _.get(parent, 'defaults.status.pricing.wholesale.adr.SB', null) ||
494
+ _.get(parent, 'defaults.status.pricing.wholesale.webAdr.SB', null),
505
495
  grp: pricing.retailSubscription - pricing.wholesaleSubscription
506
496
  }
507
497
  }