Skip to content

Commit

Permalink
Fix bug when marginPagesDisplayed is 0. Thanks to @DaWe35 Closes #396
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsieurV committed Dec 2, 2021
1 parent 207b5ea commit 137588c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Removed support for depecrated `extraAriaContext` (please use `ariaLabelBuilder` instead)

## >= 8.0.3

- Fix bug on `marginPagesDisplayed={0}` (see: https://github.com/AdeleD/react-paginate/pull/396)

## >= 8.0.2

- Add TypeScript definitions directly [in the repository](https://github.com/AdeleD/react-paginate/blob/master/dist/index.d.ts) (instead of community definitions from [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-paginate)) (see: https://github.com/AdeleD/react-paginate/issues/394)
Expand Down
2 changes: 1 addition & 1 deletion dist/react-paginate.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react-paginate.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-paginate",
"version": "8.0.2",
"version": "8.0.3",
"description": "A ReactJS component that creates a pagination.",
"main": "./dist/react-paginate.js",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions react_components/PaginationBoxView.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ export default class PaginationBoxView extends Component {
// we do nothing (because we don't want to display the page).
if (
breakLabel &&
pagesBreaking.length > 0 &&
pagesBreaking[pagesBreaking.length - 1].display !== breakView
) {
breakView = (
Expand Down

0 comments on commit 137588c

Please sign in to comment.