Bugfix: addressparser() didn't handle groups properly

This commit is contained in:
the-djmaze 2023-02-13 19:47:24 +01:00
parent ebf429215b
commit a696d6c0a1
4 changed files with 27 additions and 25 deletions

View file

@ -40,7 +40,7 @@ export class EmailCollectionModel extends AbstractCollectionModel
if (str) {
let items = {}, key;
addressparser(str).forEach(item => {
item = new EmailModel(item.address, item.name);
item = new EmailModel(item.email, item.name);
// Make them unique
key = item.email || item.name;
if (key && (item.name || !items[key])) {