From 77d27f6d7282e8756094a1b02a4dd2f4794e7abb Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 4 Dec 2017 17:02:34 +0100 Subject: [PATCH] Make sure the options are typeof array or object --- api/js/etemplate/et2_widget_selectbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index d1af1a278d..a67b8873da 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -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]["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]); }