fix(mail(js)): avoid exception when adding duplicated recipient

pull/265/head
Francis Lachapelle 2019-12-09 12:34:48 -05:00
parent 5ccc12639b
commit a303011237
1 changed files with 3 additions and 1 deletions

View File

@ -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());
}
};