File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -682,19 +682,14 @@ class BigList extends PureComponent {
682682 width : "100%" ,
683683 } ) ;
684684
685- const getEmpty = ( ) => {
686- const props = { style : fullItemStyle } ;
687-
688- return ListEmptyComponent
689- ? createElement ( ListEmptyComponent , props )
690- : renderEmpty
691- ? createElement ( renderEmpty ( ) , props )
692- : null ;
693- }
694-
695685 // On empty list
696686 const isEmptyList = this . isEmpty ( ) ;
697- const emptyItem = getEmpty ( ) ;
687+ const emptyItem = ListEmptyComponent
688+ ? createElement ( ListEmptyComponent , { style : fullItemStyle } )
689+ : renderEmpty
690+ ? createElement ( renderEmpty ( ) , { style : fullItemStyle } )
691+ : null ;
692+
698693 if ( isEmptyList && emptyItem ) {
699694 if ( hideMarginalsOnEmpty || ( hideHeaderOnEmpty && hideFooterOnEmpty ) ) {
700695 // Render empty
@@ -817,7 +812,7 @@ class BigList extends PureComponent {
817812 case BigListItemType . EMPTY :
818813 children . push (
819814 < React . Fragment key = { itemKey } >
820- { getEmpty ( ) }
815+ { emptyItem }
821816 </ React . Fragment >
822817 ) ;
823818 break ;
You can’t perform that action at this time.
0 commit comments