FS
Size: a a a
FS
FS
PM
PM
PM
ТК
FS
PM
valuesToShow
;$: {
const firstRecipient = recipients[0];
let chars = CharsPerElement - trim.length;
if (recipients.length === 1) {
return [firstRecipient];
} else {
const res = recipients.filter(i => {
if (chars - i.length > 0) {
chars -= i.length;
return true;
}
});
console.log(recipients, res);
valuesToShow
= res.length ? res : firstRecipient + trim;
}
}
PM
valuesToShow
}ТК
valuesToShow у тебя сваливались значения
FS
PM
ТК
FS
FS
PM
$: valuesToShow
= (function() {
const firstRecipient = recipients[0];
let chars = CharsPerElement - trim.length;
if (recipients.length === 1) {
return [firstRecipient];
} else {
const res = recipients.filter(i => {
if (chars - i.length > 0) {
chars -= i.length;
return true;
}
});
console.log(recipients, res);
return res.length ? res : firstRecipient + trim;
}
}
)();