diff --git a/src/app/[lang]/register/form.tsx b/src/app/[lang]/register/form.tsx index e96c5f61..114cfe61 100644 --- a/src/app/[lang]/register/form.tsx +++ b/src/app/[lang]/register/form.tsx @@ -187,7 +187,10 @@ export function Form({ cedula }: Props) { .flatMap((n) => n.messages); const errors = new Array().concat(messages, nodes, error?.id); - const message = errors.map((msg) => msg.text).join(', '); + const message = errors + .map((msg) => msg?.text) + .filter(Boolean) + .join(', '); Sentry.captureMessage(message, { user: { id: cedula, email: getValues('email') }, @@ -324,8 +327,6 @@ export function Form({ cedula }: Props) { ); } -const initialLevel = { id: 0 } as Result; - function doNothing>(e: T) { e.preventDefault();