Merge pull request #1959 from Safelite/feature/CSR-2185

CSR-2185
This commit is contained in:
CarlNation 2024-09-03 14:06:01 -04:00 committed by GitHub
commit ec00031755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -286,7 +286,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
@ -397,8 +397,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,
@ -430,7 +428,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);