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: handle zeros in paginated meta info correctly #82

Merged

Conversation

mariusheine
Copy link
Member

@mariusheine mariusheine commented Dec 11, 2023

Close #81

We don't check against !== undefined anymore but we now check for the type of the relevant pagination meta fields total, limit and skip since the check !== undefined was transpiled into !== void 0. This caused responses where any of these 3 fields were 0 to be evaluated as no paginated response and therefor led to wrong handling

@mariusheine mariusheine linked an issue Dec 11, 2023 that may be closed by this pull request
@mariusheine mariusheine changed the title 81 zeros in paginated meta info is evaluated incorrectly zeros in paginated meta info is evaluated incorrectly Dec 11, 2023
@mariusheine mariusheine changed the title zeros in paginated meta info is evaluated incorrectly fix: zeros in paginated meta info is evaluated incorrectly Dec 11, 2023
@mariusheine mariusheine self-assigned this Dec 11, 2023
anbraten
anbraten previously approved these changes Dec 12, 2023
test/utils.test.ts Outdated Show resolved Hide resolved
test/utils.test.ts Outdated Show resolved Hide resolved
test/utils.test.ts Outdated Show resolved Hide resolved
test/utils.test.ts Outdated Show resolved Hide resolved
test/utils.test.ts Outdated Show resolved Hide resolved
test/utils.test.ts Outdated Show resolved Hide resolved
test/utils.test.ts Outdated Show resolved Hide resolved
@anbraten anbraten changed the title fix: zeros in paginated meta info is evaluated incorrectly fix: handle zeros in paginated meta info correctly Dec 12, 2023
@anbraten anbraten merged commit a904d5c into main Dec 12, 2023
6 checks passed
@anbraten anbraten deleted the 81-zeros-in-paginated-meta-info-is-evaluated-incorrectly branch December 12, 2023 09:25
Copy link

🎉 This PR is included in version 3.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

zeros in paginated meta info is evaluated incorrectly
2 participants