Skip to content

Commit

Permalink
Update src/usePromise.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Mathieu Dutour <[email protected]>
  • Loading branch information
sxn and mathieudutour committed Mar 27, 2024
1 parent ac42853 commit d5179ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usePromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export function usePromise<T extends FunctionReturningPromise | FunctionReturnin
usePaginationRef.current = true;
return promiseOrPaginatedPromise(paginationArgsRef.current).then(
// @ts-expect-error too complicated for TS
({ data, hasMore, cursor }: { data: UnwrapReturn<T>; hasMore: boolean }) => {
({ data, hasMore, cursor }: { data: UnwrapReturn<T>; hasMore: boolean; cursor?: any }) => {
if (callId === lastCallId.current) {
if (paginationArgsRef.current) {
paginationArgsRef.current.cursor = cursor;
Expand Down

0 comments on commit d5179ae

Please sign in to comment.