Make sure the options are typeof array or object

This commit is contained in:
Hadi Nategh 2017-12-04 17:02:34 +01:00
parent 1de54ae9dc
commit fe5c7a5186

View File

@ -807,7 +807,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
if(_options[key]["label"]) _options[key]["label"] = this.egw().lang(_options[key]["label"]); 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"]); if(_options[key]["title"]) _options[key]["title"] = this.egw().lang(_options[key]["title"]);
} }
else if(_options.length>0 || typeof _options === 'object') else if(Array.isArray(_options) && _options.length>0 || typeof _options === 'object')
{ {
_options[key] = this.egw().lang(_options[key]); _options[key] = this.egw().lang(_options[key]);
} }