commit
50976357b3
1 changed files with 5 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ import { routeData } from "@/router/constants/routes";
|
||||||
import { consumeReferralQuerystrings } from "@/router/methods/helpers/consume-referral-info";
|
import { consumeReferralQuerystrings } from "@/router/methods/helpers/consume-referral-info";
|
||||||
import { initializeFromQueryStrings } from "@/router/methods/helpers/initialize-from-querystrings";
|
import { initializeFromQueryStrings } from "@/router/methods/helpers/initialize-from-querystrings";
|
||||||
import { stashAllQueries } from "@/router/methods/helpers/querystring-stash";
|
import { stashAllQueries } from "@/router/methods/helpers/querystring-stash";
|
||||||
|
import { queryStrings } from "@/constants/query-strings";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
|
|
||||||
export async function landingBeforeEnter(to, from) {
|
export async function landingBeforeEnter(to, from) {
|
||||||
|
|
@ -21,9 +22,10 @@ export async function landingBeforeEnter(to, from) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a session is still in memory, go to return-user.
|
const fromHeritage = to.query[queryStrings.FROM_HERITAGE];
|
||||||
if (store.getters.vehicle?.year > 0) {
|
|
||||||
console.log(`trying to redirect!`);
|
// If a session is still in memory and not loading a save quote, go to return-user.
|
||||||
|
if (store.getters.vehicle?.year > 0 && !fromHeritage) {
|
||||||
return {
|
return {
|
||||||
name: routeData.RETURN_USER.name,
|
name: routeData.RETURN_USER.name,
|
||||||
replace: true,
|
replace: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue