@nuskin/ns-product-lib 2.6.0-cx24-3377.12 → 2.6.0-cx24-3377.13

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.0-cx24-3377.13](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.12...v2.6.0-cx24-3377.13) (2023-03-10)
2
+
3
+
4
+ ### New
5
+
6
+ * Fix multiple variants not loading properly (CX24-3377) ([a35e917](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a35e917440df30c4a47d0167b0fd6702f4b6dbd6))
7
+
1
8
  # [2.6.0-cx24-3377.12](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.11...v2.6.0-cx24-3377.12) (2023-03-10)
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.0-cx24-3377.12",
3
+ "version": "2.6.0-cx24-3377.13",
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,14 +428,13 @@ const Product = function (productData) {
428
428
  };
429
429
 
430
430
  this.isBase = function () {
431
- if (this.equinoxProductId != "") {
432
- console.log(this.variants)
433
- return (Object.keys(this.variants).length && this.sku == Object.keys(this.variants)[0]) ? true : false
434
- }
435
431
  return this.sku.substring(2, 4) === "55";
436
432
  };
437
433
 
438
434
  this.isVariant = function () {
435
+ if (this.equinoxProductId != "") {
436
+ return this.variantSkus().length === 0
437
+ }
439
438
  return this.baseSku.length > 0 && this.variantSkus().length === 0;
440
439
  };
441
440