Bugfix: error undefined msg.from[0]

This commit is contained in:
the-djmaze
2024-03-26 12:26:53 +01:00
parent c14d7bdd46
commit 015dcbdc41

View File

@@ -162,11 +162,11 @@ export class MailMessageList extends AbstractViewRight {
let list = [], current, sort = FolderUserStore.sortMode() || 'DATE';
if (sort.includes('FROM')) {
MessagelistUserStore.forEach(msg => {
let email = msg.from[0].email;
let email = msg.from[0]?.email;
if (!current || email != current.id) {
current = {
id: email,
label: msg.from[0].toLine(),
label: msg.from[0]?.toLine(),
search: 'from=' + email,
messages: []
};