Skip to content

Commit 6ec32e7

Browse files
committed
Improve onLastPage detection with total items set to zero
1 parent a131287 commit 6ec32e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Responses/Concerns/PaginatedResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public function getTotalPages(): int
3939

4040
public function onLastPage(): bool
4141
{
42-
return $this->currentPage === $this->totalPages;
42+
return $this->totalItems === 0 || $this->currentPage === $this->totalPages;
4343
}
4444
}

0 commit comments

Comments
 (0)