Check that interface is there before using it; when pasting the iface is missing.

Fixes error when copy + pasting mails from different folders.
This commit is contained in:
Nathan Gray 2014-11-17 20:37:17 +00:00
parent ece1ccff43
commit 7afe1ee1e9

View File

@ -2698,7 +2698,8 @@ app.classes.mail = AppJS.extend(
{ {
for (var i = 0; i < _actionObjects.length; i++) 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()); var dataElem = $j(_actionObjects[i].iface.getDOMNode());
dataElem.addClass(_class); dataElem.addClass(_class);