From 345265ca17b63bc45244a4ebacc58f4cd6e625a4 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Mon, 18 Dec 2023 16:30:56 -0500 Subject: [PATCH] Change some magic values to constants --- src/router/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 512c44b13..377652a95 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -54,8 +54,8 @@ const routes = [ // Intercept all navigation if a submitted order exists in storage if (store.getters.hasSubmittedOrder) { - if (to.query.fmgPage !== "vehicle") { - to.query.fmgPage = "confirmation"; + if (to.query.fmgPage !== homepageName) { + to.query.fmgPage = fmgPageValues.CONFIRMATION; } } // On entering the funnel "fresh", read cookie information, decide what to do next. @@ -180,7 +180,7 @@ router.beforeEach(async (to, from, next) => { // 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") { + } else if (toQueryPage === fromQueryPage && toQueryPage === homepageName) { router.go(0); } else { next();