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

This commit is contained in:
Francis Lachapelle committed 2019-12-09 12:34:48 -05:00
1 parent 5ccc12639b
commit a303011237
1 file changed
+3 -1
@@ -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());
}
};