@nuskin/ns-product-lib 2.6.1-cx24-3608.2 → 2.6.1-cx24-3608.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.6.1-cx24-3608.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-3608.2...v2.6.1-cx24-3608.3) (2023-03-15)
2
+
3
+
4
+ ### Fix
5
+
6
+ * imageURL issue when product is kit ([0e4281d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0e4281de4435d1a5749ff9b6d52a7c4a45d75d6d))
7
+
1
8
  ## [2.6.1-cx24-3608.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-3608.1...v2.6.1-cx24-3608.2) (2023-03-15)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.1-cx24-3608.2",
3
+ "version": "2.6.1-cx24-3608.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": {
@@ -133,13 +133,14 @@ const ProductData = {
133
133
  const regex = /\d+\.\d+/
134
134
  let thumbnailImage = ''
135
135
 
136
- if (imageURL.includes('contentstack')) {
137
- thumbnailImage = imageURL + '?width=40'
138
- } else {
139
- thumbnailImage = imageURL.replace(regex, '40.40')
136
+ if (imageURL) {
137
+ if (imageURL.includes('contentstack')) {
138
+ thumbnailImage = imageURL + '?width=40'
139
+ } else {
140
+ thumbnailImage = imageURL.replace(regex, '40.40')
141
+ }
140
142
  }
141
143
 
142
-
143
144
  const { eventName, eventLabels, computedPrice, defaultProductPrice } = this.getEqProductPromotions(eqVariant);
144
145
  const productPrice = eventName ? defaultProductPrice : eqVariant.priceFacets["Regular Price"];
145
146
  const discountedPrice = eventName ? computedPrice : eqVariant.priceFacets["Regular Price"];
@@ -356,10 +357,12 @@ const ProductData = {
356
357
  const regex = /\d+\.\d+/
357
358
  let thumbnailImage = ''
358
359
 
359
- if (imageURL.includes('contentstack')) {
360
- thumbnailImage = imageURL + '?width=40'
361
- } else {
362
- thumbnailImage = imageURL.replace(regex, '40.40')
360
+ if (imageURL) {
361
+ if (imageURL.includes('contentstack')) {
362
+ thumbnailImage = imageURL + '?width=40'
363
+ } else {
364
+ thumbnailImage = imageURL.replace(regex, '40.40')
365
+ }
363
366
  }
364
367
 
365
368
  if (productData.sku && productData.sku.length > 1) {