From ecd5afa6cde25fa9d0d009cf614f7db777938f2b Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 18 Jun 2025 12:01:42 -0400 Subject: [PATCH] fix: Public share search offset is incorrect (#9465) --- app/components/PaginatedList.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/components/PaginatedList.tsx b/app/components/PaginatedList.tsx index 00e73a5e32..8f2b619e88 100644 --- a/app/components/PaginatedList.tsx +++ b/app/components/PaginatedList.tsx @@ -150,12 +150,15 @@ const PaginatedList = ({ offset, ...options, }); + if (!results) { + return; + } if (offset !== 0) { setRenderCount((prevCount) => prevCount + limit); } - if (results && (results.length === 0 || results.length < limit)) { + if (results.length === 0 || results.length < limit) { setAllowLoadMore(false); } else { setOffset((prevOffset) => prevOffset + limit);