diff --git a/src/app/core/utils.ts b/src/app/core/utils.ts index 38d21e96b..f0ccc6f6c 100644 --- a/src/app/core/utils.ts +++ b/src/app/core/utils.ts @@ -3,9 +3,9 @@ import { EmailsEndpoint } from '../types' export const setProfessionalEmails = ( emails: EmailsEndpoint ): EmailsEndpoint => { - emails.emailDomains.forEach((domain) => { - emails.emails.forEach((email) => { - if (email.value.includes(domain.value)) { + emails?.emailDomains?.forEach((domain) => { + emails?.emails?.forEach((email) => { + if (email?.value?.includes(domain?.value)) { email.professionalEmail = true } })