Skip to content

Commit ba4f4d3

Browse files
committed
Fix pagination next link appearing when it shouldn't
1 parent c563c28 commit ba4f4d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Endpoint/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private function buildPaginationLinks(Request $request, int $offset, ?int $limit
146146
$paginationLinks[] = new LastLink($this->buildUrl($request, ['page' => ['offset' => floor(($total - 1) / $limit) * $limit]]));
147147
}
148148

149-
if (($total === null && $count === $limit) || $offset + $limit < $total) {
149+
if (($total === null && $count === $limit) || $offset + $count < $total) {
150150
$paginationLinks[] = new NextLink($this->buildUrl($request, ['page' => ['offset' => $offset + $limit]]));
151151
}
152152

0 commit comments

Comments
 (0)