Fix 'Cannot read property...' error when adding an event via context menu

This commit is contained in:
Nathan Gray 2015-05-25 14:27:26 +00:00
parent aa0026f0ae
commit 18bd10bf66

View File

@ -232,7 +232,7 @@ app.classes.addressbook = AppJS.extend(
ids += "c" + id[1] + ((i < _senders.length - 1) ? "," : "");
}
var extra = {};
extra[_action.data.url.indexOf('owner') > 0 ? 'owner' : 'participants'] = ids;
extra[_action.data && _action.data.url && _action.data.url.indexOf('owner') > 0 ? 'owner' : 'participants'] = ids;
// Use framework to add calendar entry
egw.open('','calendar','add',extra);