Merge pull request #1629 from Safelite/feature/csr-1875

Quickfix -- restrict prior fix to vehicle only to preserve modals
This commit is contained in:
chloeherdsafelite 2023-12-08 14:48:07 -05:00 committed by GitHub
commit cbbf6af618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,10 @@ router.beforeEach(async (to, from, next) => {
if (isInIframe && notToPIAReturn) {
const newUrl = `${window.top.location.origin}${to.href}`;
window.top.location.href = newUrl;
} else if (toQueryPage === fromQueryPage) {
// 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 === "vehicle") {
router.go(0);
} else {
next();