fix foldertree.getLabel(folder).replace() is not a function

This commit is contained in:
Ralf Becker 2020-08-17 21:45:41 +02:00
parent 63ea0891bb
commit e188c9f904

View File

@ -426,7 +426,8 @@ app.classes.mail = AppJS.extend(
if (foldertree && pushData.acl.folder && typeof pushData.acl.unseen !== 'undefined') if (foldertree && pushData.acl.folder && typeof pushData.acl.unseen !== 'undefined')
{ {
let folder_id = {}; let folder_id = {};
folder_id[folder] = foldertree.getLabel(folder).replace(this._unseen_regexp, '')+ folder_id[folder] = (foldertree.getLabel(folder) || pushData.acl.folder)
.replace(this._unseen_regexp, '')+
(pushData.acl.unseen ? " ("+pushData.acl.unseen+")" : ''); (pushData.acl.unseen ? " ("+pushData.acl.unseen+")" : '');
this.mail_setFolderStatus(folder_id); this.mail_setFolderStatus(folder_id);
} }