@moonbase.sh/vue 0.4.67 → 0.4.68

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 CHANGED
@@ -866,7 +866,8 @@ function useCart(context) {
866
866
  const fallbackPath = typeof window !== "undefined" ? window.location.pathname : "";
867
867
  const absoluteReturnUrl = new URL((_a = options.returnUrl) != null ? _a : fallbackPath, document.baseURI).href;
868
868
  const updatedOrder = await storefront.client.orders.pushContent(storefront.currentOrder.value, {
869
- returnUrl: absoluteReturnUrl
869
+ // We only NEED a return URL if we're not redirecting
870
+ returnUrl: !options.redirect || options.returnUrl ? absoluteReturnUrl : void 0
870
871
  }, storefront.hasUtm ? storefront.utm.value : void 0);
871
872
  updatedOrder.items = storefront.enrichLineItems(updatedOrder.items);
872
873
  window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated", {
@@ -942,7 +943,8 @@ async function useCheckout(items, options, context) {
942
943
  currency: storefront.storefront.value.suggestedCurrency,
943
944
  items: checkoutSession
944
945
  }, {
945
- returnUrl: absoluteReturnUrl
946
+ // We only NEED a return URL if we're not redirecting
947
+ returnUrl: !options.redirect || options.returnUrl ? absoluteReturnUrl : void 0
946
948
  }, storefront.hasUtm ? storefront.utm.value : void 0);
947
949
  updatedOrder.items = storefront.enrichLineItems(updatedOrder.items);
948
950
  window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated", {
package/dist/index.js CHANGED
@@ -834,7 +834,8 @@ function useCart(context) {
834
834
  const fallbackPath = typeof window !== "undefined" ? window.location.pathname : "";
835
835
  const absoluteReturnUrl = new URL((_a = options.returnUrl) != null ? _a : fallbackPath, document.baseURI).href;
836
836
  const updatedOrder = await storefront.client.orders.pushContent(storefront.currentOrder.value, {
837
- returnUrl: absoluteReturnUrl
837
+ // We only NEED a return URL if we're not redirecting
838
+ returnUrl: !options.redirect || options.returnUrl ? absoluteReturnUrl : void 0
838
839
  }, storefront.hasUtm ? storefront.utm.value : void 0);
839
840
  updatedOrder.items = storefront.enrichLineItems(updatedOrder.items);
840
841
  window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated", {
@@ -910,7 +911,8 @@ async function useCheckout(items, options, context) {
910
911
  currency: storefront.storefront.value.suggestedCurrency,
911
912
  items: checkoutSession
912
913
  }, {
913
- returnUrl: absoluteReturnUrl
914
+ // We only NEED a return URL if we're not redirecting
915
+ returnUrl: !options.redirect || options.returnUrl ? absoluteReturnUrl : void 0
914
916
  }, storefront.hasUtm ? storefront.utm.value : void 0);
915
917
  updatedOrder.items = storefront.enrichLineItems(updatedOrder.items);
916
918
  window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/vue",
3
3
  "type": "module",
4
- "version": "0.4.67",
4
+ "version": "0.4.68",
5
5
  "description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "@vue/devtools-api": "^6.6.3",
20
20
  "uuid": "^9.0.1",
21
21
  "zod": "^3.23.8",
22
- "@moonbase.sh/storefront-api": "0.4.67"
22
+ "@moonbase.sh/storefront-api": "0.4.68"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/uuid": "^9.0.8",