@nuskin/ns-product-lib 2.6.0-cx24-3377.4 → 2.6.0-cx24-3377.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.6.0-cx24-3377.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.5...v2.6.0-cx24-3377.6) (2023-03-09)
2
+
3
+
4
+ ### New
5
+
6
+ * Fix multiple variants not loading properly (CX24-3377) ([d653c88](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d653c887a529d2e93e05028e9eed8064991470ee))
7
+
8
+ # [2.6.0-cx24-3377.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.4...v2.6.0-cx24-3377.5) (2023-03-09)
9
+
10
+
11
+ ### New
12
+
13
+ * Fix multiple variants not loading properly (CX24-3377) ([d681803](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d681803ccbc2290a0e843e8eb1b191d33ba97cbe))
14
+
1
15
  # [2.6.0-cx24-3377.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.3...v2.6.0-cx24-3377.4) (2023-03-09)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.0-cx24-3377.4",
3
+ "version": "2.6.0-cx24-3377.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
@@ -428,7 +428,7 @@ const Product = function (productData) {
428
428
  };
429
429
 
430
430
  this.isBase = function () {
431
- if (this.equinoxProductId != "" && this.sku == this.variants[0].sku) {
431
+ if (this.equinoxProductId != "" && (this.variants.length && this.sku === this.variants.sku[0])) {
432
432
  return !!this.variants;
433
433
  }
434
434
  return this.sku.substring(2, 4) === "55";