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
570570 if ( typeof colWidth === 'number' && ! Number . isNaN ( colWidth ) ) {
571571 return colWidth ;
572572 }
573- if ( props . columns . length > 0 ) {
573+
574+ if ( process . env . NODE_ENV !== 'production' ) {
574575 warning (
575- false ,
576+ props . columns . length === 0 ,
576577 'When use `components.body` with render props. Each column should have a fixed `width` value.' ,
577578 ) ;
578579 }
Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ describe('Table.Basic', () => {
701701 } ) ;
702702 } ) ;
703703
704- it ( 'without warning - columns is emplty ' , ( ) => {
704+ it ( 'without warning - columns is empty ' , ( ) => {
705705 resetWarned ( ) ;
706706 const errSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
707707 mount (
You can’t perform that action at this time.
0 commit comments