From 42dc848ee472a351a959137ad46d0842bbb58fb6 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 3 Sep 2024 14:00:42 -0400 Subject: [PATCH] CSR-2185 CSR-2185 vue-router no longer supports properties via params without it showing in the url. https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 --- src/router/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index de8b6411f..72a16862e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -283,7 +283,7 @@ router.afterEach(async (to, from) => { store.commit(storeMutations.UPDATE_LAST_PAGE_VISITED, to.name); // If saving on navigation is requested, check for saved SessionId or EmailAddress to determine if saving is appropriate - if (eval(to.params.isSavingNavigation)) { + if (eval(window.history.state.isSavingNavigation)) { if ( store.getters.applicationUser.savedSessionId || store.getters.order.customer?.emailAddress @@ -394,8 +394,6 @@ async function navigate( : (existingPageDataForPage ?? {}) ); - optionalParams.isSavingNavigation = isSavingNavigation; - // add querystring params to the route. if they are already in the store then no need to add them var queryStringsObject = { fmgPage: destinationFmgPageValue, @@ -427,7 +425,9 @@ async function navigate( router.push({ name: "root", query: Object.assign(optionalQuery, queryStringsObject), - params: optionalParams, + state: { + isSavingNavigation: isSavingNavigation + } }); } else if (matchingScenarioMap.destinationUrl !== undefined) { navigateToUrl(matchingScenarioMap.destinationUrl, optionalQuery);