Fix/infinite booking list (#2931)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
alannnc 2022-05-31 23:03:14 -05:00 committed by GitHub
parent 7c34be272f
commit 9ded50b5fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,10 +466,8 @@ const loggedInViewerRouter = createProtectedRouter()
}
let nextCursor: typeof skip | null = skip;
if (bookingsFetched > take) {
bookings.shift();
nextCursor += bookings.length;
nextCursor += bookingsFetched;
} else {
nextCursor = null;
}