Skip to content

Commit

Permalink
🤖 GITHUB ACTIONS format_prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Aug 14, 2024
1 parent 6575e43 commit b0fc391
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/app/cdk/side-bar/modals/modal-email/modal-email.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,16 @@ export class ModalEmailComponent implements OnInit, OnDestroy {
this.setNextEmailAsPrimary()
}
const i = this.emails.findIndex((value) => value.putCode === controlKey)
const domain = (this.emails[i].value && this.emails[i].value.includes('@')) ? this.emails[i].value.split('@')[1] : null
const domain =
this.emails[i].value && this.emails[i].value.includes('@')
? this.emails[i].value.split('@')[1]
: null
this.emails.splice(i, 1)
this.emailsForm.removeControl(controlKey)

if(domain) {
const remainingEmailsHaveDomain = this.emails.find(
(email) => (email) ? (email.verified && email.value.split('@')[1] === domain) : false
if (domain) {
const remainingEmailsHaveDomain = this.emails.find((email) =>
email ? email.verified && email.value.split('@')[1] === domain : false
)
if (!remainingEmailsHaveDomain) {
this.verifiedDomains = this.verifiedDomains.filter(
Expand Down

0 comments on commit b0fc391

Please sign in to comment.