@@ -211,6 +211,14 @@ const SliderComponent = (
211211 step = 0 ,
212212 inverted = false ,
213213 tapToSeek = false ,
214+ lowerLimit = Platform . select ( {
215+ web : minimumValue ,
216+ default : constants . LIMIT_MIN_VALUE ,
217+ } ) ,
218+ upperLimit = Platform . select ( {
219+ web : maximumValue ,
220+ default : constants . LIMIT_MAX_VALUE ,
221+ } ) ,
214222 ...props
215223 } : Props ,
216224 forwardedRef ?: Ref < typeof RCTSliderNativeComponent > ,
@@ -270,22 +278,6 @@ const SliderComponent = (
270278
271279 const passedValue = Number . isNaN ( value ) || ! value ? undefined : value ;
272280
273- const lowerLimit =
274- ! ! props . lowerLimit || props . lowerLimit === 0
275- ? props . lowerLimit
276- : Platform . select ( {
277- web : minimumValue ,
278- default : constants . LIMIT_MIN_VALUE ,
279- } ) ;
280-
281- const upperLimit =
282- ! ! props . upperLimit || props . upperLimit === 0
283- ? props . upperLimit
284- : Platform . select ( {
285- web : maximumValue ,
286- default : constants . LIMIT_MAX_VALUE ,
287- } ) ;
288-
289281 useEffect ( ( ) => {
290282 if ( lowerLimit >= upperLimit ) {
291283 console . warn (
@@ -299,7 +291,8 @@ const SliderComponent = (
299291 onLayout = { ( event ) => {
300292 setWidth ( event . nativeEvent . layout . width ) ;
301293 } }
302- style = { [ style , { justifyContent : 'center' } ] } >
294+ style = { [ style , { justifyContent : 'center' } ] }
295+ >
303296 { props . StepMarker || ! ! props . renderStepNumber ? (
304297 < StepsIndicator
305298 options = { options }
@@ -326,8 +319,8 @@ const SliderComponent = (
326319 Platform . OS === 'web'
327320 ? props . thumbImage
328321 : props . StepMarker
329- ? undefined
330- : Image . resolveAssetSource ( props . thumbImage )
322+ ? undefined
323+ : Image . resolveAssetSource ( props . thumbImage )
331324 }
332325 ref = { forwardedRef }
333326 style = { [
0 commit comments