From d52e81defe144dd2b171328d94f7ffbaaa1f631d Mon Sep 17 00:00:00 2001 From: Jason Kotenko Date: Fri, 15 Sep 2023 09:42:15 -0700 Subject: [PATCH] Update paging-cursor.js --- packages/cli/snippets/paging-cursor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/snippets/paging-cursor.js b/packages/cli/snippets/paging-cursor.js index c01fbfab..2cb134b0 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; };