diff --git a/src/global-methods.js b/src/global-methods.js index 9426acede..c286ede9b 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -98,7 +98,7 @@ export default { ); } - if (error.response.status != "404") { + if (error.response.status && error.response.status != "404") { // Do not route to error logic when no wipers found or no promo found (404s) router.navigateError(); diff --git a/src/layouts/payment-pia-return/payment-pia-return.vue b/src/layouts/payment-pia-return/payment-pia-return.vue index 9e6e76c56..a7979f8aa 100644 --- a/src/layouts/payment-pia-return/payment-pia-return.vue +++ b/src/layouts/payment-pia-return/payment-pia-return.vue @@ -185,9 +185,6 @@ export default { await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER); this.$router.navigateWithoutSaving(this.navigationScenarios.PIA_SUCCESS, this.$route); }, - forwardButtonAction() { - this.$router.navigateWithoutSaving(this.navigationScenarios.PIA_SUCCESS, this.$route); - }, }, components: { loadingModal, diff --git a/src/router/index.js b/src/router/index.js index d329c358a..fd1e4ae8f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -268,11 +268,14 @@ router.beforeEach(async (to, from, next) => { if ((isInIframe && notToPIAReturn) || fromPaymentToConfirmation) { const newUrl = `${window.top.location.origin}${to.href}`; window.top.location.href = newUrl; + next(false); + // Refresh page if navigating to self to prevent locking. // For now only carved out for vehicle; all modals are opened through anchor tags at the moment, // which also self navigate, but relied on the page remaining the same on self-navigation. } else if (toQueryPage === fromQueryPage && toQueryPage === getRedirectedStartPage()) { router.go(0); + next(false); } else { next(); }