Check that array entry is there before looking into it.

Prevents error when accessing deleted user.
This commit is contained in:
Ralf Becker 2014-10-01 19:59:19 +00:00
parent ac0a2d0930
commit 7aa20273f1

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')
{