From fda5cb3efaec7a4351c7c3f394f817c99d86da88 Mon Sep 17 00:00:00 2001 From: Pieter Koornhof Date: Tue, 11 Jun 2019 12:36:36 +0200 Subject: [PATCH] Replace for...of with for loop for compatibility with IE 11 --- src/Rangeslider.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Rangeslider.js b/src/Rangeslider.js index 9bd8aa1..e5d4bee 100755 --- a/src/Rangeslider.js +++ b/src/Rangeslider.js @@ -306,7 +306,8 @@ class Slider extends Component { if (labelKeys.length > 0) { labelKeys = labelKeys.sort((a, b) => (reverse ? a - b : b - a)) - for (let key of labelKeys) { + for (var lki = 0, len = labelKeys.length; lki < len; lki++) { + const key = labelKeys[lki]; const labelPosition = this.getPositionFromValue(key) const labelCoords = this.coordinates(labelPosition) const labelStyle = { [direction]: `${labelCoords.label}px` }