Add safeguard against null response
This commit is contained in:
parent
e46ef5daa8
commit
d188c1b015
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user