Fix noLimit method
This commit is contained in:
parent
bbca1e44ed
commit
848a8df42d
|
|
@ -142,7 +142,7 @@ class Index
|
|||
$paginationLinks[] = new PrevLink($this->buildUrl($request, $params));
|
||||
}
|
||||
|
||||
if ($schema->isCountable() && $schema->getPerPage() && $offset + $limit < $total) {
|
||||
if ($schema->isCountable() && $schema->getPerPage() && $limit && $offset + $limit < $total) {
|
||||
$paginationLinks[] = new LastLink($this->buildUrl($request, ['page' => ['offset' => floor(($total - 1) / $limit) * $limit]]));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ final class Type
|
|||
* Get the maximum number of records that can be listed, or null if there
|
||||
* is no limit.
|
||||
*/
|
||||
public function getLimit(): int
|
||||
public function getLimit(): ?int
|
||||
{
|
||||
return $this->limit;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue