Cleanup Email.toLine()

This commit is contained in:
the-djmaze 2022-03-30 10:26:00 +02:00
parent 2af5257e10
commit 7585ac450e
3 changed files with 4 additions and 4 deletions

View file

@ -148,7 +148,7 @@ export class EmailAddressesComponent {
hook = (v && [',', ';', '\n'].includes(v.slice(-1))) ? EmailModel.splitEmailLine(val) : null,
values = (hook || [val]).map(value => EmailModel.parseEmailLine(value))
.flat(Infinity)
.map(item => (item.toLine ? [item.toLine(false), item] : [item, null]));
.map(item => (item.toLine ? [item.toLine(), item] : [item, null]));
if (values.length) {
values.forEach(a => {