Skip to content

Commit

Permalink
Update paging-cursor.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkotenko committed Sep 15, 2023
1 parent cd7185b commit d52e81d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cli/snippets/paging-cursor.js
Expand Up @@ -23,8 +23,8 @@ const perform = async (z, bundle) => {
);

// after fetching a page, set the returned cursor for the next page,
// or empty/null if this was the last one.
await z.cursor.set(response.nextPage);
// or an empty string if the cursor is null
await z.cursor.set(response.nextPage ?? '');

return response.items;
};

0 comments on commit d52e81d

Please sign in to comment.