Check if the given options are type of array or object before proceeding of translation. Fix bug "cannot assign to read only property '0' of string" in tracker site configuration.

This commit is contained in:
Hadi Nategh 2017-10-02 16:15:29 +02:00
parent 22a9eac389
commit db562cbd7e

View File

@ -800,7 +800,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
else if(_options.lenght>0 || typeof _options === 'object')
{
_options[key] = this.egw().lang(_options[key]);
}