From 5450085a54fde29b9db72c0a363acdac2c9a63e1 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 11 Feb 2014 22:40:58 +0000 Subject: [PATCH] Avoid error if value sent was not a string. Warning is also sent to console by framework, but this prevents errors. --- etemplate/js/et2_widget_description.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_description.js b/etemplate/js/et2_widget_description.js index fea1713a0a..faa6589b56 100644 --- a/etemplate/js/et2_widget_description.js +++ b/etemplate/js/et2_widget_description.js @@ -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); }