Skip to content

Commit 84e7efc

Browse files
committed
Fix pagination not showing all pages
1 parent 3f4bd1c commit 84e7efc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/adapter/search-response-adapter/search-response-adapter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ export function adaptSearchResponse<T>(
2929
if (exhaustiveFacetsCount) {
3030
searchResponseOptionals.exhaustiveFacetsCount = exhaustiveFacetsCount
3131
}
32-
33-
const hits = adaptHits(searchResponse.hits, searchContext, paginationContext)
34-
3532
const nbPages = ceiledDivision(
3633
searchResponse.hits.length,
3734
paginationContext.hitsPerPage
3835
)
36+
const hits = adaptHits(searchResponse.hits, searchContext, paginationContext)
3937

4038
const exhaustiveNbHits = searchResponse.exhaustiveNbHits
4139
const nbHits = searchResponse.nbHits

0 commit comments

Comments
 (0)