File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -570,9 +570,10 @@ function Table<RecordType extends DefaultRecordType>(tableProps: TableProps<Reco
570
570
if ( typeof colWidth === 'number' && ! Number . isNaN ( colWidth ) ) {
571
571
return colWidth ;
572
572
}
573
- if ( props . columns . length > 0 ) {
573
+
574
+ if ( process . env . NODE_ENV !== 'production' ) {
574
575
warning (
575
- false ,
576
+ props . columns . length === 0 ,
576
577
'When use `components.body` with render props. Each column should have a fixed `width` value.' ,
577
578
) ;
578
579
}
Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ describe('Table.Basic', () => {
701
701
} ) ;
702
702
} ) ;
703
703
704
- it ( 'without warning - columns is emplty ' , ( ) => {
704
+ it ( 'without warning - columns is empty ' , ( ) => {
705
705
resetWarned ( ) ;
706
706
const errSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
707
707
mount (
You can’t perform that action at this time.
0 commit comments