From 76905cb3f1e8859a48880f9326b4f183586fda3c Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 21 Nov 2023 10:27:16 -0500 Subject: [PATCH] CSR-1816 | SaveSessionPromise invalidation fix Separate out the saveSessionPromise reset from other "fresh" funnel entry logic --- src/router/index.js | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 809c0e96c..e2188997a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -61,30 +61,29 @@ const routes = [ to.query.fmgPage = "confirmation"; } } - // On entering the funnel "fresh", read cookie information, decide what to do next. payment pages used to return from safelitehop so exclude here - else if ( - from.redirectedFrom === undefined && - !to.query.fmgPage !== "payment" && - !to.query.fmgPage !== "payment-pia-return" - ) { + // On entering the funnel "fresh", read cookie information, decide what to do next. + else if (from.redirectedFrom === undefined) { // clear the saveSessionPromise - if it exists in the vuex store but a new instance was created // the saveSessionPromise will no longer point to a valid promise baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); - // Remove the parameter after quote release - const loadSessionResponse = await loadSessionIfPresent( - to.query.isInsurance != null - ? to.query.isInsurance == "true" - ? true - : false - : null, - to.query.fmgPage - ); + if (!to.query.fmgPage.startsWith("payment")) { + //payment pages used to return from safelitehop so exclude here + // Remove the parameter after quote release + const loadSessionResponse = await loadSessionIfPresent( + to.query.isInsurance != null + ? to.query.isInsurance == "true" + ? true + : false + : null, + to.query.fmgPage + ); - const pageToRedirectTo = await getPageToRouteExistingOrderTo(to); + const pageToRedirectTo = await getPageToRouteExistingOrderTo(to); - // Assign our fmgPage so it will load normally like the other pages. - to.query.fmgPage = pageToRedirectTo; + // Assign our fmgPage so it will load normally like the other pages. + to.query.fmgPage = pageToRedirectTo; + } } await runExperiments(to.query.fmgPage);