diff --git a/mail/js/app.js b/mail/js/app.js index d3fc40f9e7..68847d67b1 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -3036,12 +3036,12 @@ app.classes.mail = AppJS.extend( var _id = _elems[i].id; var dataElem = egw.dataGetUIDdata(_id); var subject = dataElem? dataElem.data.subject: _elems[i].subject; - if (this.egw.is_popup()) + if (this.egw.is_popup() && this.et2._inst.name == 'mail.display') { subject = this.et2.getArrayMgr('content').getEntry('mail_displaysubject'); } // Replace these now, they really cause problems later - var filename = subject.replace(/[\f\n\t\v\/\\\?]/g,"_")|| 'unknown'; + var filename = subject ? subject.replace(/[\f\n\t\v\/\\\?]/g,"_") : 'unknown'; ids.push(_id); names.push(filename+'.eml'); }