Skip to content

Commit

Permalink
Fix Limit being 0
Browse files Browse the repository at this point in the history
  • Loading branch information
timoclsn committed Aug 10, 2024
1 parent 399d5d8 commit 21647bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/data/resources/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ export const selectResources = async (

resourceIdsQuery.orderBy(orderBy);
resourceIdsQuery.groupBy(resource.id);
resourceIdsQuery.limit(limit ? limit + 1 : 0);

if (limit) {
resourceIdsQuery.limit(limit + 1);
}

// Build up resource query
const resourcesQuery = db
Expand Down

0 comments on commit 21647bb

Please sign in to comment.