Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "pagesBreaking[pagesBreaking.length - 1] is undefined" #396

Closed
wants to merge 4 commits into from

Conversation

DaWe35
Copy link

@DaWe35 DaWe35 commented Nov 23, 2021

Fixed this error:
image

Reproduce:

  • switch to branch v9
  • set marginPagesDisplayed={0}
  • npm start and click the 2 or next page button

@MonsieurV
Copy link
Collaborator

Hi @DaWe35

Thanks for the PR and good catch.

Can we just add a test to reproduce the case that break (before the fix)?

@MonsieurV MonsieurV changed the base branch from v9 to master December 2, 2021 23:19
@MonsieurV MonsieurV changed the base branch from master to v9 December 2, 2021 23:19
@MonsieurV MonsieurV closed this in 137588c Dec 2, 2021
@MonsieurV
Copy link
Collaborator

Hi @DaWe35,

Thanks for the report and fix, I thought it was only for the v9, but it affects also the master, so I've just applied it directly. (Doing a pick was a bit overwhelming for 1 line; also there was this href={1})

Thanks again!

@AdeleD this could be released as https://github.com/AdeleD/react-paginate/releases/tag/v8.0.3
I'll maybe do a minor (still v8)

@DaWe35
Copy link
Author

DaWe35 commented Dec 3, 2021

Hi, thanks @MonsieurV and I'm sorry for the slow response, I forgot to write the test.

@KangYoosam
Copy link

I've experienced same issue.
Thanks @DaWe35 fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants