From 5f85d2a59227590e620e20da9df419a95ca4c3fe Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 10 Jan 2014 13:33:28 +0000 Subject: [PATCH] fix javascript error for missing toolbaractions --- mail/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 837b22a24e..1578eade51 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -624,8 +624,8 @@ app.classes.mail = AppJS.extend( //console.log("mail_preview",dataElem); this.mail_selectedMails.push(_id); this.mail_disablePreviewArea(false); - var toolbaractions = JSON.parse(dataElem.data.toolbaractions); - this.et2.getWidgetById('toolbar').set_actions(toolbaractions); + var toolbaractions = ((typeof dataElem != 'undefined' && typeof dataElem.data != 'undefined' && typeof dataElem.data.toolbaractions != 'undefined')?JSON.parse(dataElem.data.toolbaractions):undefined); + if (toolbaractions) this.et2.getWidgetById('toolbar').set_actions(toolbaractions); var IframeHandle = this.et2.getWidgetById('messageIFRAME'); //console.log(IframeHandle); IframeHandle.set_src(egw.link('/index.php',{menuaction:'mail.mail_ui.loadEmailBody',_messageID:_id}));