@pelcro/react-pelcro-js 3.2.0-beta.32 → 3.2.0-beta.33
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/dist/index.cjs.js +3 -3
- package/dist/index.esm.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -7057,13 +7057,13 @@ class PelcroActions {
|
|
|
7057
7057
|
switchView("login");
|
|
7058
7058
|
});
|
|
7059
7059
|
|
|
7060
|
-
_defineProperty$3(this, "addToCart",
|
|
7061
|
-
const itemToAdd = window.Pelcro.ecommerce.products.getBySkuId(Number(
|
|
7060
|
+
_defineProperty$3(this, "addToCart", itemSkuId => {
|
|
7061
|
+
const itemToAdd = window.Pelcro.ecommerce.products.getBySkuId(Number(itemSkuId));
|
|
7062
7062
|
|
|
7063
7063
|
if (!itemToAdd) {
|
|
7064
7064
|
console.error("invalid item SKU id");
|
|
7065
7065
|
return false;
|
|
7066
|
-
} //Dispatch PelcroElementsCartItemAdded when an item added successfully to the
|
|
7066
|
+
} //Dispatch PelcroElementsCartItemAdded when an item added successfully to the
|
|
7067
7067
|
|
|
7068
7068
|
|
|
7069
7069
|
document.dispatchEvent(cartItemAdded(itemToAdd));
|
package/dist/index.esm.js
CHANGED
|
@@ -7027,13 +7027,13 @@ class PelcroActions {
|
|
|
7027
7027
|
switchView("login");
|
|
7028
7028
|
});
|
|
7029
7029
|
|
|
7030
|
-
_defineProperty$3(this, "addToCart",
|
|
7031
|
-
const itemToAdd = window.Pelcro.ecommerce.products.getBySkuId(Number(
|
|
7030
|
+
_defineProperty$3(this, "addToCart", itemSkuId => {
|
|
7031
|
+
const itemToAdd = window.Pelcro.ecommerce.products.getBySkuId(Number(itemSkuId));
|
|
7032
7032
|
|
|
7033
7033
|
if (!itemToAdd) {
|
|
7034
7034
|
console.error("invalid item SKU id");
|
|
7035
7035
|
return false;
|
|
7036
|
-
} //Dispatch PelcroElementsCartItemAdded when an item added successfully to the
|
|
7036
|
+
} //Dispatch PelcroElementsCartItemAdded when an item added successfully to the
|
|
7037
7037
|
|
|
7038
7038
|
|
|
7039
7039
|
document.dispatchEvent(cartItemAdded(itemToAdd));
|