@nuskin/ns-product-lib 2.8.0-cx24-3684.4 → 2.8.0-cx24-3684.6

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.8.0-cx24-3684.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0-cx24-3684.5...v2.8.0-cx24-3684.6) (2023-04-19)
2
+
3
+
4
+ ### Fix
5
+
6
+ * remove price as default for setPrice promotion (#CX24-3684) ([2598be7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/2598be77b40fff57344c832bac65f8271c7f5958)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
7
+
8
+ # [2.8.0-cx24-3684.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0-cx24-3684.4...v2.8.0-cx24-3684.5) (2023-04-18)
9
+
10
+
11
+ ### Fix
12
+
13
+ * event price #(CX24-3684) ([1ca87d4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1ca87d4993f85aefd5f67664d3febae0fb672e6c))
14
+
1
15
  # [2.8.0-cx24-3684.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0-cx24-3684.3...v2.8.0-cx24-3684.4) (2023-04-17)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.8.0-cx24-3684.4",
3
+ "version": "2.8.0-cx24-3684.6",
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": {
package/src/product.js CHANGED
@@ -251,7 +251,7 @@ const Product = function (productData) {
251
251
  !this.price ||
252
252
  priceType !== this.priceType ||
253
253
  this.eventName !== eventPricing.eventName
254
- ) && !option.isEqPromotion) {
254
+ ) && (option && !option.isEqPromotion)) {
255
255
  this.setPrice(eventPricing.price || this.getPricing(priceType));
256
256
  this.setCv(eventPricing.cv || this.getCvWithType(priceType));
257
257
  this.setPv(eventPricing.pv || this.getPvWithType(priceType));
@@ -260,7 +260,7 @@ const Product = function (productData) {
260
260
  changed = true;
261
261
  }
262
262
 
263
- if (option.isEqPromotion) {
263
+ if (option && !!option.isEqPromotion) {
264
264
  //retain product.price as original price
265
265
  this.setPrice(this.getPricing(priceType));
266
266
  this.setCv(this.getCvWithType(priceType));