key can be 0 or "" too, therefor need to check if attribute value exists

This commit is contained in:
Ralf Becker 2013-11-06 10:31:31 +00:00
parent e53f781610
commit 90a9df3d1e

View File

@ -637,12 +637,12 @@ var et2_selectbox = et2_inputWidget.extend(
{
// Allow some special extras for objects by passing the whole thing
_options[key]["label"] = _options[key]["label"] ? _options[key]["label"] : "";
this._appendMultiOption(_options[key].value ? _options[key].value : key,
this._appendMultiOption(typeof _options[key].value != 'undefined' ? _options[key].value : key,
_options[key], _options[key]["title"]);
}
else
{
this._appendOptionElement(_options[key].value ? _options[key].value : key,
this._appendOptionElement(typeof _options[key].value != 'undefined' ? _options[key].value : key,
_options[key]["label"] ? _options[key]["label"] : "",
_options[key]["title"] ? _options[key]["title"] : "");
}