diff --git a/core/src/components/range/range.tsx b/core/src/components/range/range.tsx index 0c10972b41..f05fd128ea 100644 --- a/core/src/components/range/range.tsx +++ b/core/src/components/range/range.tsx @@ -488,8 +488,7 @@ interface RangeKnob { handleKeyboard: (name: KnobName, isIncrease: boolean) => void; } -function renderKnob({ knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard }: RangeKnob) { - const isRTL = document.dir === 'rtl'; +function renderKnob(isRTL: boolean, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard }: RangeKnob) { const start = isRTL ? 'right' : 'left'; const knobStyle = () => { @@ -552,4 +551,4 @@ function ratioToValue( function valueToRatio(value: number, min: number, max: number): number { return clamp(0, (value - min) / (max - min), 1); -} +} \ No newline at end of file