mirror of
https://github.com/strapi/strapi.git
synced 2026-01-06 12:13:52 +00:00
Fix for infinite pagination when count is zero
This commit is contained in:
parent
8151c6b9c3
commit
857cbbc848
@ -12,7 +12,7 @@ import styles from './styles.scss';
|
||||
|
||||
/* eslint-disable jsx-a11y/anchor-is-valid */
|
||||
class GlobalPagination extends React.Component {
|
||||
getLastPageNumber = () => Math.ceil(this.props.count / this.props.params._limit);
|
||||
getLastPageNumber = () => Math.ceil(this.props.count / this.props.params._limit) || 1;
|
||||
|
||||
handleDotsClick = (e) => e.preventDefault();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user