0013130: Exception if no email is set
authorMichael Spahn <m.spahn@metaways.de>
Tue, 23 May 2017 12:38:32 +0000 (14:38 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 23 May 2017 16:00:39 +0000 (18:00 +0200)
https://forge.tine20.org/view.php?id=13130

Change-Id: Ie7d6ce84919081375237041de7391ac412a2d977
Reviewed-on: http://gerrit.tine20.com/customers/4740
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Felamimail/js/GridPanelHook.js

index 25b45cf..b1ba731 100644 (file)
@@ -217,9 +217,13 @@ Ext.apply(Tine.Felamimail.GridPanelHook.prototype, {
             if (mailAddress)
                 mailAddresses.push(mailAddress);
         } else {
-            Ext.each(contact.get("emails").split(","), function(mail) {
-                mailAddresses.push(mail);
-            });
+            var emails = contact.get("emails");
+
+            if (emails) {
+                Ext.each(emails.split(","), function (mail) {
+                    mailAddresses.push(mail);
+                });
+            }
         }
     },