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

This commit is contained in:
Nathan Gray 2015-05-26 14:29:30 +00:00
parent ee900fbafc
commit 90ec79834b

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);