From 15aaca73ac3822a0c6f9592c292f5794355ff971 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Sat, 24 Aug 2024 10:58:42 -0400 Subject: [PATCH] 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(); }