From 53b9f28350e3a359bf3745bcc580f2c3a9e5aa74 Mon Sep 17 00:00:00 2001 From: johnwalley Date: Fri, 10 Jul 2020 10:34:37 +0100 Subject: [PATCH] fix: update value if any element of the array changes --- src/slider.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slider.js b/src/slider.js index ce49b3d..175f64c 100644 --- a/src/slider.js +++ b/src/slider.js @@ -515,8 +515,9 @@ function slider(orientation, scale) { function updateValue(newValue, notifyListener) { if ( - value[0] !== newValue[0] || - (value.length > 1 && value[1] !== newValue[1]) + value.some(function (d, i) { + return d !== newValue[i]; + }) ) { value = newValue;