From a5bb724b2ead911fe91f0570bae6fe558b0fafcb Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Tue, 15 Oct 2024 22:35:36 +0300 Subject: [PATCH] fix professional domain util --- src/app/core/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 } })