Merge remote-tracking branch 'origin/release/2025.05.22' into feature/CASH-45
This commit is contained in:
commit
fffa7fd889
1 changed files with 18 additions and 0 deletions
|
|
@ -14,11 +14,18 @@ import { runExperiments } from "@/router/methods/helpers/run-experiments";
|
||||||
import { bailout } from "@/router/methods/error";
|
import { bailout } from "@/router/methods/error";
|
||||||
import { checkPagePrerequisites } from "@/router/methods/page-prerequisites";
|
import { checkPagePrerequisites } from "@/router/methods/page-prerequisites";
|
||||||
import { checkLogParam } from "@/helpers/debug-log-helper";
|
import { checkLogParam } from "@/helpers/debug-log-helper";
|
||||||
|
import { debugLog } from "@/helpers/debug-log-helper";
|
||||||
|
|
||||||
export async function beforeEach(to, from) {
|
export async function beforeEach(to, from) {
|
||||||
try {
|
try {
|
||||||
await analyticsMixin.methods.validateSession();
|
await analyticsMixin.methods.validateSession();
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
|
{
|
||||||
|
debugLog(`--- before-each.js ${from?.name} start ---`);
|
||||||
|
debugLog(" funnel cookie init: ", getFunnelCookie());
|
||||||
|
}
|
||||||
|
|
||||||
if (getFunnelCookie()?.SuppressConceptFunnel) {
|
if (getFunnelCookie()?.SuppressConceptFunnel) {
|
||||||
// Redirect to heritage.
|
// Redirect to heritage.
|
||||||
return {
|
return {
|
||||||
|
|
@ -48,6 +55,12 @@ export async function beforeEach(to, from) {
|
||||||
// Process funnel cookie.
|
// Process funnel cookie.
|
||||||
updateOrCreateFunnelCookie();
|
updateOrCreateFunnelCookie();
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
|
{
|
||||||
|
debugLog(`--- before-each.js ${from?.name} start ---`);
|
||||||
|
debugLog(" funnel cookie after: ", getFunnelCookie());
|
||||||
|
}
|
||||||
|
|
||||||
// If sent from heritage, need to load session.
|
// If sent from heritage, need to load session.
|
||||||
const fromHeritageFlag = consumeQueryFromStash(queryStrings.FROM_HERITAGE);
|
const fromHeritageFlag = consumeQueryFromStash(queryStrings.FROM_HERITAGE);
|
||||||
if (fromHeritageFlag) {
|
if (fromHeritageFlag) {
|
||||||
|
|
@ -72,6 +85,11 @@ export async function beforeEach(to, from) {
|
||||||
}
|
}
|
||||||
|
|
||||||
await runExperiments(to.name);
|
await runExperiments(to.name);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
|
{
|
||||||
|
debugLog("--- before-each.js end ---");
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const errorPayload = {
|
const errorPayload = {
|
||||||
cause: "Uncaught exception in `beforeEach`.",
|
cause: "Uncaught exception in `beforeEach`.",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue