@nuskin/product-components 3.20.2 → 3.20.3-it-31008.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc +1 -1
- package/docs/CHANGELOG.md +1 -1
- package/mixins/NsProductMixin.js +7 -5
- package/package.json +1 -1
- package/services/NsProductDataService.js +6 -2
package/.releaserc
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.20.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.20.1...v3.20.2) (2026-
|
|
1
|
+
## [3.20.3-it-31008.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.20.3-it-31008.1...v3.20.3-it-31008.2) (2026-06-08)
|
package/mixins/NsProductMixin.js
CHANGED
|
@@ -433,7 +433,9 @@ const NsProductMixin = {
|
|
|
433
433
|
this.variants = searchItem.getVariantsList
|
|
434
434
|
? searchItem.getVariantsList()
|
|
435
435
|
: [];
|
|
436
|
-
this.isBaseSku = !!(
|
|
436
|
+
this.isBaseSku = !!(
|
|
437
|
+
searchItem.variantSkus && searchItem.variantSkus().length > 0
|
|
438
|
+
);
|
|
437
439
|
this.isVariantSku = !!(searchItem.isVariant && searchItem.isVariant());
|
|
438
440
|
|
|
439
441
|
if (searchItem.setPriceAndPvFromType) {
|
|
@@ -469,7 +471,7 @@ const NsProductMixin = {
|
|
|
469
471
|
return;
|
|
470
472
|
}
|
|
471
473
|
|
|
472
|
-
if (product.
|
|
474
|
+
if (product.variantSkus().length > 0) {
|
|
473
475
|
this.baseSku = product.sku;
|
|
474
476
|
this.variants = product.getVariantsList();
|
|
475
477
|
this.baseProduct = product;
|
|
@@ -607,7 +609,7 @@ const NsProductMixin = {
|
|
|
607
609
|
* Sets product to new selection
|
|
608
610
|
*/
|
|
609
611
|
async setActiveProduct() {
|
|
610
|
-
if (this.baseProduct && this.baseProduct.
|
|
612
|
+
if (this.baseProduct && this.baseProduct.variantSkus().length > 0) {
|
|
611
613
|
let activeProduct = this.variants.find(
|
|
612
614
|
variantProduct => variantProduct.sku === this.activeSku
|
|
613
615
|
);
|
|
@@ -643,7 +645,7 @@ const NsProductMixin = {
|
|
|
643
645
|
}
|
|
644
646
|
this.description = this.product.longDescr;
|
|
645
647
|
|
|
646
|
-
this.isBaseSku = this.product.
|
|
648
|
+
this.isBaseSku = this.product.variantSkus().length > 0;
|
|
647
649
|
this.isVariantSku = this.product.isVariant();
|
|
648
650
|
|
|
649
651
|
this.isExclusive = this.product.isExclusive;
|
|
@@ -705,7 +707,7 @@ const NsProductMixin = {
|
|
|
705
707
|
|
|
706
708
|
handleProductChanged(product) {
|
|
707
709
|
const baseProductChanged =
|
|
708
|
-
product.
|
|
710
|
+
product.variantSkus().length > 0 &&
|
|
709
711
|
(this.baseSku === product.sku ||
|
|
710
712
|
product.variantSkus().includes(this.activeSku));
|
|
711
713
|
const productChanged =
|
package/package.json
CHANGED
|
@@ -273,8 +273,12 @@ if (!NsProductDataService) {
|
|
|
273
273
|
await getConfiguration(["Equinox_Markets"])
|
|
274
274
|
).Equinox_Markets;
|
|
275
275
|
|
|
276
|
-
//
|
|
277
|
-
if (
|
|
276
|
+
// Some callers return `{ products }` without a top-level `count`.
|
|
277
|
+
if (
|
|
278
|
+
productData &&
|
|
279
|
+
Array.isArray(productData.products) &&
|
|
280
|
+
productData.products.length
|
|
281
|
+
) {
|
|
278
282
|
const productsToSaveToSession = [];
|
|
279
283
|
for (const product of productData.products) {
|
|
280
284
|
// do a last quick check to make sure we don't add duplicate products
|