Check to make sure data is there before accessing it, hopefully avoids a js error blocking context menu.

This commit is contained in:
nathangray 2016-05-27 08:55:18 -06:00
parent 179d121efa
commit 2560320cfe

View File

@ -951,6 +951,10 @@ app.classes.addressbook = AppJS.extend(
return false;
}
var content = egw.dataGetUIDdata(_selected[0].id);
// Selected, but data not found
if(!content || typeof content.data === 'undefined') return false;
var type = _action.id === 'business'?'one':'two';
var addrs = [
content.data['adr_'+type+'_street'],