diff --git a/docs/index.html b/docs/index.html index af504ece5..d20e35116 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5576,8 +5576,8 @@

Wha ); // 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; }; diff --git a/packages/cli/README.md b/packages/cli/README.md index 5b42757c9..004c033e3 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -3524,8 +3524,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; }; diff --git a/packages/cli/docs/index.html b/packages/cli/docs/index.html index af504ece5..d20e35116 100644 --- a/packages/cli/docs/index.html +++ b/packages/cli/docs/index.html @@ -5576,8 +5576,8 @@

Wha ); // 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; }; diff --git a/packages/cli/snippets/paging-cursor.js b/packages/cli/snippets/paging-cursor.js index c01fbfabd..2cb134b0a 100644 --- a/packages/cli/snippets/paging-cursor.js +++ b/packages/cli/snippets/paging-cursor.js @@ -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; };