File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default function Steps(props: StepsProps) {
24
24
} ) ;
25
25
26
26
// Fill dots
27
- if ( dots ) {
27
+ if ( dots && step !== null ) {
28
28
let current = min ;
29
29
while ( current <= max ) {
30
30
dotSet . add ( current ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ describe('Common', () => {
51
51
expect ( container2 . getElementsByClassName ( 'rc-slider-dot-active' ) ) . toHaveLength ( 4 ) ;
52
52
} ) ;
53
53
54
+ it ( 'should render normally when `dots=true` and `step=null`' , ( ) => {
55
+ const { container } = render ( < Slider step = { null } dots /> ) ;
56
+ expect ( ( ) => container ) . not . toThrowError ( ) ;
57
+ } ) ;
58
+
54
59
it ( 'should render dots correctly when dotStyle is dynamic`' , ( ) => {
55
60
const { container : container1 } = render (
56
61
< Slider value = { 50 } step = { 10 } dots dotStyle = { ( dotValue ) => ( { width : `${ dotValue } px` } ) } /> ,
You can’t perform that action at this time.
0 commit comments