From 080d2ac28e2903addfc76b956f827547e56dee1f Mon Sep 17 00:00:00 2001 From: Katie Date: Mon, 15 Aug 2022 10:23:13 -0400 Subject: [PATCH] CSR-514 Add async/await to runExperimentsForTrigger --- src/router/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index ea4c5cbcc..6fcd48c28 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -62,7 +62,7 @@ const routes = [ to.query.fmgPage = pageToRedirectTo; } - runExperiments(to.query.fmgPage); + await runExperiments(to.query.fmgPage); // Process funnel cookie. updateOrCreateFunnelCookie(); @@ -269,16 +269,16 @@ function arePagePrerequisitesValid(component) { } // Run SiteEntry and PageEntry triggers for experiments -function runExperiments(nextPage) { +async function runExperiments(nextPage) { if (!store.getters.applicationUser.triggeredSiteEntry) { - baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, { + await baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, { userId: getDeviceIdValue(), triggerEvent: experimentTriggers.SITE_ENTRY, triggerValue: applicationConfig.SITE_ENTRY_TRIGGER_VALUE }) } - baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, { + await baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, { userId: getDeviceIdValue(), triggerEvent: experimentTriggers.PAGE_ENTRY, triggerValue: nextPage