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

WithPagination should ignore non-positive numbers. #682

Merged
merged 3 commits into from
Aug 1, 2021
Merged

WithPagination should ignore non-positive numbers. #682

merged 3 commits into from
Aug 1, 2021

Conversation

favonia
Copy link

@favonia favonia commented Jul 31, 2021

Make WithPagination(PaginationOptions{}) a no-op.

Description

With... options should ignore zero values. This has been the case for various options, but not for WithPagination.

Has your change been tested?

Existing tests passed.

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for finding this! if we're touching this code, let's take it that one step further and ensure we're only passing positive values and not allowing this library to request negative values

favonia and others added 2 commits July 31, 2021 18:56
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
@favonia favonia changed the title WithPagination should ignore zero numbers. WithPagination should ignore negative numbers. Jul 31, 2021
@favonia favonia changed the title WithPagination should ignore negative numbers. WithPagination should ignore non-positive numbers. Jul 31, 2021
@jacobbednarz jacobbednarz merged commit 8b318bc into cloudflare:master Aug 1, 2021
@favonia favonia deleted the zero-pagination branch August 1, 2021 01:06
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.

2 participants