Skip to content

Commit

Permalink
fix(mail(js)): avoid exception when adding duplicated recipient
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Dec 9, 2019
1 parent 5ccc126 commit a303011
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion UI/WebServerResources/js/Mailer/MessageEditorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@
i = recipients.indexOf(contact);
recipients.splice(i, 1);
for (j = 0; j < contact.members.length; j++) {
recipients.splice(i + j, 0, contact.members[j].$shortFormat());
var recipient = contact.members[j].$shortFormat();
if (recipients.indexOf(recipient) < 0)
recipients.splice(i + j, 0, contact.members[j].$shortFormat());
}
};

Expand Down

0 comments on commit a303011

Please sign in to comment.