Avoid error if value sent was not a string. Warning is also sent to console by framework, but this prevents errors.

This commit is contained in:
Nathan Gray 2014-02-11 22:40:58 +00:00
parent 32971ef3cc
commit 5450085a54

View File

@ -122,7 +122,7 @@ var et2_description = et2_baseWidget.extend([et2_IDetachedDOM],
set_value: function(_value) {
if (!_value) _value = "";
if (!this.options.no_lang) _value = this.egw().lang(_value);
if (this.options.value && this.options.value.indexOf('%s') != -1)
if (this.options.value && (this.options.value+"").indexOf('%s') != -1)
{
_value = this.options.value.replace(/%s/g, _value);
}