From b63ba9d164b5e4e3cb0006713a9ce6e9f525ad08 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 3 Oct 2019 15:41:22 +0930 Subject: [PATCH] Don't show next link if there are no more models --- src/Handler/Index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Index.php b/src/Handler/Index.php index 923bdcf..dbe9adb 100644 --- a/src/Handler/Index.php +++ b/src/Handler/Index.php @@ -95,7 +95,7 @@ class Index implements RequestHandlerInterface $models = $adapter->get($query); - if ((count($models) && $total === null) || $offset + $limit < $total) { + if ((count($models) === $limit && $total === null) || $offset + $limit < $total) { $paginationLinks[] = new NextLink($this->buildUrl($request, ['page' => ['offset' => $offset + $limit]])); }