Skip to content

Commit 6c2ba32

Browse files
committed
Merge remote-tracking branch 'pierrethibaudeau/feature/issue-#3393' into 2.5
2 parents 3022501 + f3d0192 commit 6c2ba32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Hydra/Serializer/PartialCollectionViewNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function normalize($object, $format = null, array $context = [])
113113
$data['hydra:view']['hydra:previous'] = IriHelper::createIri($parsed['parts'], $parsed['parameters'], $this->pageParameterName, $currentPage - 1.);
114114
}
115115

116-
if (null !== $lastPage && $currentPage !== $lastPage || null === $lastPage && $pageTotalItems >= $itemsPerPage) {
116+
if (null !== $lastPage && $currentPage < $lastPage || null === $lastPage && $pageTotalItems >= $itemsPerPage) {
117117
$data['hydra:view']['hydra:next'] = IriHelper::createIri($parsed['parts'], $parsed['parameters'], $this->pageParameterName, $currentPage + 1.);
118118
}
119119
}

0 commit comments

Comments
 (0)