From df72c38f22baa549edc8cbfe6a5ec4b406196c0d Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Fri, 21 Aug 2009 01:06:22 +0000 Subject: [PATCH] ensure that the value is a number --- deluge/ui/web/js/ext-extensions-debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/ui/web/js/ext-extensions-debug.js b/deluge/ui/web/js/ext-extensions-debug.js index 91fa5c3ba..1270308f2 100644 --- a/deluge/ui/web/js/ext-extensions-debug.js +++ b/deluge/ui/web/js/ext-extensions-debug.js @@ -412,7 +412,7 @@ Ext.extend(Ext.ux.form.Spinner.NumberStrategy, Ext.ux.form.Spinner.Strategy, { if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){ return nan ? '' : value; } - return value.toFixed(this.decimalPrecision); + return Number(value).toFixed(this.decimalPrecision); } });