Merge pull request #764 from Safelite/defect/digital/SSR-1260
SSR-1260 Fix router params not working
This commit is contained in:
commit
1f476e4000
2 changed files with 3 additions and 5 deletions
|
|
@ -266,9 +266,7 @@ export default {
|
|||
);
|
||||
},
|
||||
shouldDisplayVehicleChangeAlert() {
|
||||
return this.$route.params[
|
||||
this.routerParams.DISPLAY_VEHICLE_CHANGE_ALERT
|
||||
];
|
||||
return this.$router?.options?.history?.state[this.routerParams.DISPLAY_VEHICLE_CHANGE_ALERT] ?? false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ router.afterEach(async (to, from) => {
|
|||
}
|
||||
|
||||
if (to.query.issPage !== issPageValues.TPA_CONFIRMATION && to.query.issPage !== issPageValues.ORDER_CONFIRMATION) {
|
||||
const saveSessionSynchronous = !!from.params[routerParams.SAVE_SESSION_SYNCHRONOUS];
|
||||
const saveSessionSynchronous = !!router.options.history.state[routerParams.SAVE_SESSION_SYNCHRONOUS];
|
||||
await saveSession({ shouldAwaitSaveSessionQueue: saveSessionSynchronous }).catch((error) => {
|
||||
if (from.name === issPageValues.WELCOME_PAGE) {
|
||||
store.setBailout(bailoutMessage.saveSessionError(error.data));
|
||||
|
|
@ -316,7 +316,7 @@ function navigate(
|
|||
query: Object.assign(optionalQuery, {
|
||||
issPage: matchingScenarioMap.destinationIssPageValue
|
||||
}),
|
||||
params: optionalParams // TODO I don't think this actually works
|
||||
state: optionalParams
|
||||
});
|
||||
} else if (matchingScenarioMap.destinationUrl) {
|
||||
navigateToUrl(matchingScenarioMap.destinationUrl, optionalQuery);
|
||||
|
|
|
|||
Loading…
Reference in a new issue