@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "branches": [
3
- "master"
3
+ "master", {"name":"IT-31008", "channel":"prerelease", "prerelease":"it-31008"}
4
4
  ],
5
5
  "plugins": [
6
6
  "@semantic-release/release-notes-generator",
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-04-27)
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)
@@ -433,7 +433,9 @@ const NsProductMixin = {
433
433
  this.variants = searchItem.getVariantsList
434
434
  ? searchItem.getVariantsList()
435
435
  : [];
436
- this.isBaseSku = !!(searchItem.isBase && searchItem.isBase());
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.isBase()) {
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.isBase()) {
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.isBase();
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.isBase() &&
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.20.2",
3
+ "version": "3.20.3-it-31008.2",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -273,8 +273,12 @@ if (!NsProductDataService) {
273
273
  await getConfiguration(["Equinox_Markets"])
274
274
  ).Equinox_Markets;
275
275
 
276
- // product data response has products
277
- if (productData.count && productData.products.length) {
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