From 84faa90fa79c626e8e52c10a76c9aadb9fb82893 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:29:19 +0200 Subject: [PATCH] fix professional email detection logic (#2432) Co-authored-by: Angel Montenegro --- src/app/core/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/core/utils.ts b/src/app/core/utils.ts index f0ccc6f6c..67c233f51 100644 --- a/src/app/core/utils.ts +++ b/src/app/core/utils.ts @@ -5,7 +5,10 @@ export const setProfessionalEmails = ( ): EmailsEndpoint => { emails?.emailDomains?.forEach((domain) => { emails?.emails?.forEach((email) => { - if (email?.value?.includes(domain?.value)) { + if ( + email?.value?.split('@')[1].endsWith('.' + domain?.value) || + email?.value?.split('@')[1] === domain?.value + ) { email.professionalEmail = true } })