From 15aaca73ac3822a0c6f9592c292f5794355ff971 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Sat, 24 Aug 2024 10:58:42 -0400 Subject: [PATCH 1/3] CSR-2183: avoid 'invalid navigation guard' by ensuring next() is always resolved --- src/router/index.js | 3 +++ 1 file changed, 3 insertions(+) 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(); } From ba143082baa0158c76831619511bb53294d67897 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Sat, 24 Aug 2024 10:59:33 -0400 Subject: [PATCH 2/3] CSR-2183: remove forward button action since we're not using it --- src/layouts/payment-pia-return/payment-pia-return.vue | 3 --- 1 file changed, 3 deletions(-) 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, From 15200297eafbf18ba5df81b8c2b05cc6a05ab8ef Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Sat, 24 Aug 2024 11:01:26 -0400 Subject: [PATCH 3/3] CSR-2183: add logic for when error.response.status is undefined like 404 condition --- src/global-methods.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();