Add safeguard against null response

This commit is contained in:
PAlexanderFranklin 2024-01-15 17:41:25 -08:00
parent e46ef5daa8
commit d188c1b015

View File

@ -105,7 +105,7 @@ async function main() {
console.error(failedRequest)
uberJSON = [...uberJSON, failedRequest]
}
if (!body.data.pagination.hasMoreData) {
if (!body.data?.pagination?.hasMoreData) {
break
}
paginationOption.cursor = body.data.pagination.nextCursor