Skip to content

Commit

Permalink
Fix how prevPageCursor is computed
Browse files Browse the repository at this point in the history
  • Loading branch information
manelcecs committed Mar 1, 2024
1 parent 7157a93 commit 16c4d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/domain-services/flows/flow-search-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export class FlowSearchService {
flows: items,
hasNextPage: limit <= flows.length,
hasPreviousPage: nextPageCursor !== undefined,
prevPageCursor: nextPageCursor ?? 0,
prevPageCursor: nextPageCursor ? nextPageCursor - limit : 0,
nextPageCursor: nextPageCursor ? nextPageCursor + limit : limit,
pageSize: flows.length,
sortField: `${orderBy.entity}.${orderBy.column}` as FlowSortField,
Expand Down

0 comments on commit 16c4d83

Please sign in to comment.