Skip to content

Commit

Permalink
fix professional email detection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Dec 17, 2024
1 parent d639207 commit 748bb9a
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 748bb9a

Please sign in to comment.