Skip to content

Commit

Permalink
fix professional email detection logic (#2432)
Browse files Browse the repository at this point in the history
Co-authored-by: Angel Montenegro <[email protected]>
  • Loading branch information
auumgn and amontenegro authored Dec 17, 2024
1 parent 619317a commit 84faa90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/core/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
Expand Down

0 comments on commit 84faa90

Please sign in to comment.