aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.slider.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r--ui/jquery.ui.slider.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index bed4185e7..185fe809c 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -559,9 +559,12 @@ $.widget("ui.slider", $.ui.mouse, {
},
_trimValue: function(val) {
- if (val < this._valueMin()) val = this._valueMin();
- if (val > this._valueMax()) val = this._valueMax();
-
+ if (val < this._valueMin()) {
+ return this._valueMin();
+ }
+ if (val > this._valueMax()) {
+ return this._valueMax();
+ }
return val;
},