@gomusdev/web-components 1.22.0 → 1.22.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.
@@ -5693,6 +5693,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
5693
5693
  localStorage.setItem("go-auth", this.toString());
5694
5694
  }
5695
5695
  load() {
5696
+ if (!localStorage) {
5697
+ return;
5698
+ }
5696
5699
  const str = localStorage.getItem("go-auth");
5697
5700
  if (!str) {
5698
5701
  this.signOut();
@@ -30769,6 +30772,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
30769
30772
  let token = prop($$props, "token", 7);
30770
30773
  const orderDetails = new OrderDetails(token());
30771
30774
  setDetails($$props.$$host, orderDetails);
30775
+ onMount(() => {
30776
+ cart.clearItems();
30777
+ });
30772
30778
  var $$exports = {
30773
30779
  orderDetails,
30774
30780
  get token() {
@@ -31546,9 +31552,6 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31546
31552
  }
31547
31553
  function generateQuantityOptions(cart2, item) {
31548
31554
  const { min: min2, max: max2 } = selectOptions(cart2, item);
31549
- if (max2 < min2) {
31550
- throw new Error("(generateQuantityOptions) max must be greater than min");
31551
- }
31552
31555
  const options = [{ value: 0, label: "0" }];
31553
31556
  for (let quantity = min2; quantity <= max2; quantity++) {
31554
31557
  if (quantity == 0) continue;
@@ -5693,6 +5693,9 @@ class Auth {
5693
5693
  localStorage.setItem("go-auth", this.toString());
5694
5694
  }
5695
5695
  load() {
5696
+ if (!localStorage) {
5697
+ return;
5698
+ }
5696
5699
  const str = localStorage.getItem("go-auth");
5697
5700
  if (!str) {
5698
5701
  this.signOut();
@@ -30769,6 +30772,9 @@ function Order($$anchor, $$props) {
30769
30772
  let token = prop($$props, "token", 7);
30770
30773
  const orderDetails = new OrderDetails(token());
30771
30774
  setDetails($$props.$$host, orderDetails);
30775
+ onMount(() => {
30776
+ cart.clearItems();
30777
+ });
30772
30778
  var $$exports = {
30773
30779
  orderDetails,
30774
30780
  get token() {
@@ -31546,9 +31552,6 @@ function selectOptions(cart2, item) {
31546
31552
  }
31547
31553
  function generateQuantityOptions(cart2, item) {
31548
31554
  const { min: min2, max: max2 } = selectOptions(cart2, item);
31549
- if (max2 < min2) {
31550
- throw new Error("(generateQuantityOptions) max must be greater than min");
31551
- }
31552
31555
  const options = [{ value: 0, label: "0" }];
31553
31556
  for (let quantity = min2; quantity <= max2; quantity++) {
31554
31557
  if (quantity == 0) continue;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.22.0",
7
+ "version": "1.22.2",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",