Add check for nulls, they break

This commit is contained in:
Nathan Gray 2013-11-21 23:43:53 +00:00
parent c6388f3d89
commit ad3f10d1b0

View File

@ -807,7 +807,7 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM],
}
}
// Allow some special extras for objects by passing the whole thing - value might not be key
if(typeof _options[key] == 'object' && typeof _options[key].value != 'undefined' && _options[key].value != key)
if(typeof _options[key] == 'object' && _options[key] != null && typeof _options[key].value != 'undefined' && _options[key].value != key)
{
// Use value, not key, so it goes into the right place
this.optionValues[_options[key].value] = _options[key];