diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 7e37cb1a..89b42094 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -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: { diff --git a/src/router/index.js b/src/router/index.js index b51c31c2..388a978c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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);