Skip to content

Commit

Permalink
Update exchanges/graphcache/src/extras/simplePagination.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jovi De Croock <[email protected]>
  • Loading branch information
hoangvvo and JoviDeCroock authored Nov 19, 2020
1 parent 4322422 commit 46a4b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exchanges/graphcache/src/extras/simplePagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const simplePagination = ({

const isAhead = !prevOffset || currentOffset > prevOffset;

if (isAhead === (mergeMode === 'inwards')) {
if ((!prevOffset || currentOffset > prevOffset) && mergeMode === 'inwards') {
result = [...result, ...tempResult];
} else {
result = [...tempResult, ...result];
Expand Down

0 comments on commit 46a4b51

Please sign in to comment.