@@ -152,13 +152,13 @@ class Pagination extends React.Component {
152152
153153 getJumpPrevPage = ( ) => {
154154 const { showLessItems } = this . props ;
155- const hasPagerCount = this . hasPagerCount ( )
155+ const hasPagerCount = this . hasPagerCount ( ) ;
156156 return Math . max ( 1 , this . state . current - ( showLessItems && ! hasPagerCount ? 3 : 5 ) ) ;
157157 }
158158
159159 getJumpNextPage = ( ) => {
160160 const { showLessItems } = this . props ;
161- const hasPagerCount = this . hasPagerCount ( )
161+ const hasPagerCount = this . hasPagerCount ( ) ;
162162 return Math . min (
163163 calculatePage ( undefined , this . state , this . props ) ,
164164 this . state . current + ( showLessItems && ! hasPagerCount ? 3 : 5 )
@@ -352,9 +352,11 @@ class Pagination extends React.Component {
352352 // `pagerCount` priority is greater than `showLessItems`.
353353 const hasPagerCount = this . hasPagerCount ( ) ;
354354 const boundary = pagerCount === 0 ? 0 : 1 ;
355- const boundaryRemainder = hasPagerCount ? ( pagerCount % 2 !== 0 ? 0 : boundary ) : 0 ;
355+ const pagerCountBoundary = pagerCount % 2 !== 0 ? 0 : boundary ;
356+ const boundaryRemainder = hasPagerCount ? pagerCountBoundary : 0 ;
356357 const halfPagerCount = Math . max ( 0 , Math . floor ( ( pagerCount - 1 ) / 2 ) ) ;
357- const pageBufferSize = hasPagerCount ? halfPagerCount : ( showLessItems ? 1 : halfPagerCount ) ;
358+ const halfHasLessItemsCount = showLessItems ? 1 : halfPagerCount ;
359+ const pageBufferSize = hasPagerCount ? halfPagerCount : halfHasLessItemsCount ;
358360
359361 const goButton = ( props . showQuickJumper && props . showQuickJumper . goButton ) ;
360362 const { current, pageSize } = this . state ;
0 commit comments