Skip to content

Commit

Permalink
Fix wrong logic
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Nov 10, 2023
1 parent a75ddea commit 9e53a31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/subsocial/datahub/posts/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function getPaginatedPostsByRootPostId({
// - subscription
// - invalidation
// so the offset has to accommodate the length of the current first page
const offset = Math.min((page - 2) * CHAT_PER_PAGE + firstPageDataLength, 0)
const offset = Math.max((page - 2) * CHAT_PER_PAGE + firstPageDataLength, 0)

const res = await datahubQueryRequest<
GetCommentIdsInPostIdQuery,
Expand Down

0 comments on commit 9e53a31

Please sign in to comment.