diff --git a/app/routes/shared/formular.server.ts b/app/routes/shared/formular.server.ts index 3f9d4176c..bfab01c36 100644 --- a/app/routes/shared/formular.server.ts +++ b/app/routes/shared/formular.server.ts @@ -282,12 +282,13 @@ export const action = async ({ request }: ActionFunctionArgs) => { }); const customEventName = flowController.getMeta(stepId)?.customEventName; - if (customEventName) + if (customEventName) { sendCustomEvent({ request, eventName: customEventName, properties: validationResult.data, }); + } const returnTo = formData.get("_returnTo"); const destination = diff --git a/app/routes/shared/vorabcheck.server.ts b/app/routes/shared/vorabcheck.server.ts index c1d4110e5..adb116140 100644 --- a/app/routes/shared/vorabcheck.server.ts +++ b/app/routes/shared/vorabcheck.server.ts @@ -178,12 +178,13 @@ export const action = async ({ request }: ActionFunctionArgs) => { }); const customEventName = flowController.getMeta(stepId)?.customEventName; - if (customEventName) + if (customEventName) { sendCustomEvent({ request, eventName: customEventName, properties: validationResult.data, }); + } const destination = flowController.getNext(stepId)?.url ?? flowController.getInitial().url;