Avoid errors for invalid account options

This commit is contained in:
Nathan Gray 2015-12-04 19:59:05 +00:00
parent 003b090103
commit 9117771ea2

View File

@ -258,6 +258,11 @@ var et2_selectAccount = et2_selectbox.extend(
// Options are not indexed, so we must look
for(var i = 0; !found && i < this.options.select_options.length; i++)
{
if (typeof this.options.select_options[i] != 'object')
{
egw.debug('warn',this.id + ' wrong option '+i+' this.options.select_options=', this.options.select_options);
continue;
}
if(this.options.select_options[i].value == search[j]) found = true;
}
if(!found)