From 7afe1ee1e948bf3d1c9d3087b0a6529413a1fb3d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 17 Nov 2014 20:37:17 +0000 Subject: [PATCH] Check that interface is there before using it; when pasting the iface is missing. Fixes error when copy + pasting mails from different folders. --- mail/js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mail/js/app.js b/mail/js/app.js index 91453c8262..3f6e2af3ee 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2698,7 +2698,8 @@ app.classes.mail = AppJS.extend( { for (var i = 0; i < _actionObjects.length; i++) { - if (_actionObjects[i].id.length>0) + // Check that the ID & interface is there. Paste is missing iface. + if (_actionObjects[i].id.length>0 && _actionObjects[i].iface) { var dataElem = $j(_actionObjects[i].iface.getDOMNode()); dataElem.addClass(_class);