Skip to content

End loop if page length less than totalRecords#9

Open
jmosul wants to merge 3 commits intoUKHSA-Internal:masterfrom
jmosul:publichealthengland_coronavirus-dashboard-api-javascript-sdk_8
Open

End loop if page length less than totalRecords#9
jmosul wants to merge 3 commits intoUKHSA-Internal:masterfrom
jmosul:publichealthengland_coronavirus-dashboard-api-javascript-sdk_8

Conversation

@jmosul
Copy link
Copy Markdown

@jmosul jmosul commented May 3, 2021

This fixes #8 by leaving the getData while loop if the current page retrieved from the API has the same records as the total retrievable. Avoiding infinite loop caused by no longer receiving a 204.

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.

Requesting fewer records than one page causes infinite loop

1 participant