Reapply "Load session before updating funnel cookie"

This reverts commit d8c838f530.
This commit is contained in:
Chloe Herd 2025-05-13 16:37:42 -04:00
parent b6cd797a53
commit 567a881766

View file

@ -52,6 +52,12 @@ export async function beforeEach(to, from) {
}
}
// If sent from heritage, need to load session.
const fromHeritageFlag = consumeQueryFromStash(queryStrings.FROM_HERITAGE);
if (fromHeritageFlag) {
await loadSessionIfPresent(true, routeData.SERVICE_LOCATION.name);
}
// Process funnel cookie.
updateOrCreateFunnelCookie();
@ -61,12 +67,6 @@ export async function beforeEach(to, from) {
debugLog(" funnel cookie after: ", getFunnelCookie());
}
// If sent from heritage, need to load session.
const fromHeritageFlag = consumeQueryFromStash(queryStrings.FROM_HERITAGE);
if (fromHeritageFlag) {
await loadSessionIfPresent(true, routeData.SERVICE_LOCATION.name);
}
// Update if logging is enabled.
checkLogParam();