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: default arguments are unsound #31

Merged
merged 4 commits into from
Apr 16, 2024
Merged

fix: default arguments are unsound #31

merged 4 commits into from
Apr 16, 2024

Conversation

KATT
Copy link
Contributor

@KATT KATT commented Apr 16, 2024

  • fix page: undefined crashing
  • fix all default arguments

@@ -103,9 +103,11 @@ export const createPaginator = <O extends PaginatorOptions>(
function paginate(this, args) {
return {
withPages: async (options = {}) => {
const { page, limit, includePageCount } = {
page: 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

page:1 can be overwritten by options.page being undefined

@deptyped deptyped merged commit d81921e into deptyped:main Apr 16, 2024
1 check passed
@KATT KATT deleted the bugfix branch April 17, 2024 12:47
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