File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ const Tracks: React.FC<TrackProps> = (props) => {
4747
4848 // ========================== Render ==========================
4949 const tracksNode =
50- classNames . tracks || styles . tracks ? (
50+ trackList ?. length && ( classNames . tracks || styles . tracks ) ? (
5151 < Track
5252 index = { null }
5353 prefixCls = { prefixCls }
Original file line number Diff line number Diff line change @@ -662,4 +662,10 @@ describe('Slider', () => {
662662 const { asFragment } = render ( < Slider included = { false } /> ) ;
663663 expect ( asFragment ( ) . firstChild ) . toMatchSnapshot ( ) ;
664664 } ) ;
665+
666+ it ( 'tipFormatter should not crash with undefined value' , ( ) => {
667+ [ undefined , null ] . forEach ( ( value ) => {
668+ render ( < Slider value = { value } tooltip = { { open : true } } styles = { { tracks : { } } } /> ) ;
669+ } ) ;
670+ } ) ;
665671} ) ;
You can’t perform that action at this time.
0 commit comments