Check that array entry is there before looking into it.

Prevents error when accessing deleted user.
This commit is contained in:
Nathan Gray 2014-10-01 15:53:31 +00:00
parent 7c3683f3e8
commit f8540288d8

View File

@ -128,7 +128,7 @@ egw.extend('user', egw.MODULE_GLOBAL, function()
var store = _id < 0 ? accountStore.groups : accountStore.accounts;
for(var i=0; i < store.length; ++i)
{
if (_id == store[i].value)
if (store && typeof store[i] != 'undefined' && _id == store[i].value)
{
if (_type == 'delete')
{