aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.slider.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.slider.js')
-rw-r--r--ui/ui.slider.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/ui.slider.js b/ui/ui.slider.js
index 1b5a9c5ac..7c603c624 100644
--- a/ui/ui.slider.js
+++ b/ui/ui.slider.js
@@ -482,7 +482,9 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
return val;
} else {
- return this.options.values;
+ // .slice() creates a copy of the array
+ // this prevents outside manipulation of the internal state
+ return this.options.values.slice();
}
},