mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
fix javascript error stalling eT2 rendering, if option label is null eg. because it could not be json encoded because of non-utf8 chars in it
This commit is contained in:
parent
35f6de7f2a
commit
66ecee59a5
@ -649,7 +649,7 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
// Translate the options
|
||||
if(!this.options.no_lang)
|
||||
{
|
||||
if (typeof _options[key] === 'object')
|
||||
if (typeof _options[key] === 'object' && _options[key] !== null)
|
||||
{
|
||||
if(_options[key]["label"]) _options[key]["label"] = this.egw().lang(_options[key]["label"]);
|
||||
if(_options[key]["title"]) _options[key]["title"] = this.egw().lang(_options[key]["title"]);
|
||||
@ -660,7 +660,7 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof _options[key] === 'object' && _options[key] != null)
|
||||
if (typeof _options[key] === 'object' && _options[key] !== null)
|
||||
{
|
||||
// Optgroup
|
||||
if(typeof _options[key]["label"] == 'undefined' && typeof _options[key]["title"] == "undefined")
|
||||
@ -677,7 +677,7 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
|
||||
for(var sub in _options[key])
|
||||
{
|
||||
if (typeof _options[key][sub] === 'object')
|
||||
if (typeof _options[key][sub] === 'object' && _options[key][sub] !== null)
|
||||
{
|
||||
this._appendOptionElement(sub,
|
||||
_options[key][sub]["label"] ? _options[key][sub]["label"] : "",
|
||||
|
Loading…
Reference in New Issue
Block a user