Skip to content

Commit b63ba9d

Browse files
committed
Don't show next link if there are no more models
1 parent 4cb2085 commit b63ba9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Handler/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function handle(Request $request): Response
9595

9696
$models = $adapter->get($query);
9797

98-
if ((count($models) && $total === null) || $offset + $limit < $total) {
98+
if ((count($models) === $limit && $total === null) || $offset + $limit < $total) {
9999
$paginationLinks[] = new NextLink($this->buildUrl($request, ['page' => ['offset' => $offset + $limit]]));
100100
}
101101

0 commit comments

Comments
 (0)