Skip to content

Commit 8efa123

Browse files
fix(site): do not return next page if the current size is lower than the limit (#10287)
1 parent 3c49290 commit 8efa123

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

site/src/api/queries/workspaceBuilds.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export const infiniteWorkspaceBuilds = (
2323
return {
2424
queryKey: ["workspaceBuilds", workspaceId, req],
2525
getNextPageParam: (lastPage, pages) => {
26+
if (lastPage.length < limit) {
27+
return undefined;
28+
}
2629
return pages.length + 1;
2730
},
2831
queryFn: ({ pageParam = 0 }) => {

0 commit comments

Comments
 (0)