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

receivable types: fetch beyond page limit #534

Merged
merged 7 commits into from
Oct 21, 2024
Merged
2 changes: 1 addition & 1 deletion src/leaseCreateCharge/saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function* fetchReceivableTypesSaga(): Generator<any, any, any> {
switch (statusCode) {
case 200:
allReceivableTypes.push(...bodyAsJson.results);
nextUrl = bodyAsJson.next;
nextUrl = bodyAsJson.next || null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there some value in bodyAsJson.next that is not the next URL, or already null if there are no more receivable types?

Copy link
Contributor

Choose a reason for hiding this comment

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

I just thought the value is null already, if there's no more data coming from backend.

Copy link
Contributor

Choose a reason for hiding this comment

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

If what Juho says is correct then the or is a bit rendundant right?

break;

default:
Expand Down