@nuskin/ns-product-lib 2.21.2 → 2.21.3-it-31008.1
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/package.json +1 -1
- package/src/product.js +3 -9
package/package.json
CHANGED
package/src/product.js
CHANGED
|
@@ -450,10 +450,6 @@ const Product = function (productData) {
|
|
|
450
450
|
return this.custTypes.includes("30");
|
|
451
451
|
};
|
|
452
452
|
|
|
453
|
-
this.isBase = function () {
|
|
454
|
-
return this.sku.substring(2, 4) === "55";
|
|
455
|
-
};
|
|
456
|
-
|
|
457
453
|
this.isVariant = function () {
|
|
458
454
|
return this.baseSku.length > 0 && this.variantSkus().length === 0;
|
|
459
455
|
};
|
|
@@ -579,11 +575,9 @@ const Product = function (productData) {
|
|
|
579
575
|
this.thumbnail = ProductUtils.applyBaseUrl(this.thumbnail, baseUrl);
|
|
580
576
|
this.fullImage = ProductUtils.applyBaseUrl(this.fullImage, baseUrl);
|
|
581
577
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
variant.setBaseUrl(baseUrl);
|
|
586
|
-
}
|
|
578
|
+
for (const variantSku in this.variants) {
|
|
579
|
+
const variant = this.variants[variantSku];
|
|
580
|
+
variant.setBaseUrl(baseUrl);
|
|
587
581
|
}
|
|
588
582
|
};
|
|
589
583
|
|