progressbar: option-test fails for non-numeric values, so anything non-numeric is now normalized to 0

This commit is contained in:
Jörn Zaefferer 2009-09-15 08:38:11 +00:00
parent c958e0c714
commit 4f69883996

View File

@ -79,8 +79,10 @@ $.widget("ui.progressbar", {
},
_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();