From 5d30c0abecdb533ed76d59098f61483163222985 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Mon, 23 Dec 2019 11:42:11 +0300 Subject: [PATCH] Fixed #119 - Range slider goes out of bounds --- src/components/slider/Slider.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/slider/Slider.vue b/src/components/slider/Slider.vue index f84ee81d6..e7ef2e422 100644 --- a/src/components/slider/Slider.vue +++ b/src/components/slider/Slider.vue @@ -96,18 +96,18 @@ export default { if (this.handleIndex == 0) { if (newValue < this.min) newValue = this.min; - else if (value > this.value[1]) + else if (newValue >= this.value[1]) newValue = this.value[1]; } else { if (newValue > this.max) newValue = this.max; - else if (newValue < this.value[0]) + else if (newValue <= this.value[0]) newValue = this.value[0]; } modelValue = [...this.value]; - modelValue[this.handleIndex] = Math.floor(value); + modelValue[this.handleIndex] = Math.floor(newValue); } else { if (newValue < this.min)