r3220 committed - progressbar: option-test fails for non-numeric values, so anything non...
Revision: 3220
Author: joern.zaefferer
Date: Tue Sep 15 01:38:11 2009
Log: progressbar: option-test fails for non-numeric values, so anything
non-numeric is now normalized to 0
http://code.google.com/p/jquery-ui/source/detail?r=3220
Modified:
/trunk/ui/ui.progressbar.js
=======================================
--- /trunk/ui/ui.progressbar.js Sat Apr 18 07:34:20 2009
+++ /trunk/ui/ui.progressbar.js Tue Sep 15 01:38:11 2009
@@ -79,8 +79,10 @@
},
_value: function() {
-
var val = this.options.value;
+ // normalize invalid value
+ if (typeof val != "number")
+ val = 0;
if (val < this._valueMin()) val = this._valueMin();
if (val > this._valueMax()) val = this._valueMax();