mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
Fix zero division when computing pages
This commit is contained in:
parent
e9d493c052
commit
815fba9cc3
@ -300,7 +300,7 @@ impl Index {
|
|||||||
HitsInfo::Pagination {
|
HitsInfo::Pagination {
|
||||||
hits_per_page,
|
hits_per_page,
|
||||||
page: offset / hits_per_page + 1,
|
page: offset / hits_per_page + 1,
|
||||||
total_pages: (number_of_hits + hits_per_page - 1) / query.hits_per_page,
|
total_pages: (number_of_hits + hits_per_page - 1) / hits_per_page,
|
||||||
total_hits: number_of_hits,
|
total_hits: number_of_hits,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user