@nuskin/ns-product-lib 2.6.1-cx24-3608.3 → 2.6.1-cx24-3608.5

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [2.6.1-cx24-3608.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-3608.4...v2.6.1-cx24-3608.5) (2023-03-15)
2
+
3
+
4
+ ### Fix
5
+
6
+ * imageURL issue when product is kit ([9ccb840](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9ccb8403d2217d0e20107c560d9fa797c9bbbb95))
7
+ * imageURL issue when product is kit ([38eabd3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/38eabd3b29d8b33462509c17e98805819781f344))
8
+ * imageURL issue when product is kit ([5eb2c04](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/5eb2c0439b6e1a456a2c9f232f3d7f502ea46e4b))
9
+
10
+ ## [2.6.1-cx24-3608.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-3608.3...v2.6.1-cx24-3608.4) (2023-03-15)
11
+
12
+
13
+ ### Fix
14
+
15
+ * imageURL issue when product is kit ([0bde1fb](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0bde1fb0ce99186a30859c2f3509d32c1861cf7b))
16
+ * imageURL issue when product is kit ([e302726](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/e30272648ad6214c0dca08f40a6a3f5511c661cd))
17
+
1
18
  ## [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
19
 
3
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.1-cx24-3608.3",
3
+ "version": "2.6.1-cx24-3608.5",
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": {
@@ -130,16 +130,7 @@ const ProductData = {
130
130
  eqProductVariantMapper: function (eqVariant) {
131
131
 
132
132
  let imageURL = eqVariant.properties.imageURL ? eqVariant.properties.imageURL : '';
133
- const regex = /\d+\.\d+/
134
- let thumbnailImage = ''
135
-
136
- if (imageURL) {
137
- if (imageURL.includes('contentstack')) {
138
- thumbnailImage = imageURL + '?width=40'
139
- } else {
140
- thumbnailImage = imageURL.replace(regex, '40.40')
141
- }
142
- }
133
+ let thumbnailImage = (imageURL) ? imageURL + '?width=40' : ''
143
134
 
144
135
  const { eventName, eventLabels, computedPrice, defaultProductPrice } = this.getEqProductPromotions(eqVariant);
145
136
  const productPrice = eventName ? defaultProductPrice : eqVariant.priceFacets["Regular Price"];
@@ -354,16 +345,8 @@ const ProductData = {
354
345
  for (const productData of productDataResponse) {
355
346
  let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
356
347
  let imageURL = product.properties.imageURL ? product.properties.imageURL : '';
357
- const regex = /\d+\.\d+/
358
- let thumbnailImage = ''
359
-
360
- if (imageURL) {
361
- if (imageURL.includes('contentstack')) {
362
- thumbnailImage = imageURL + '?width=40'
363
- } else {
364
- thumbnailImage = imageURL.replace(regex, '40.40')
365
- }
366
- }
348
+ let thumbnailImage = imageURL ? imageURL + '?width=40' : ''
349
+
367
350
 
368
351
  if (productData.sku && productData.sku.length > 1) {
369
352
  // exclude base product from variants