diff --git a/lib/search/pagination.rb b/lib/search/pagination.rb index a5307ac2ed2..ac8da27ac2d 100644 --- a/lib/search/pagination.rb +++ b/lib/search/pagination.rb @@ -54,7 +54,7 @@ def current_page def pagination_object { - 'current_page' => [current_page, total_pages].min, + 'current_page' => [current_page, total_viewable_pages].min, 'per_page' => ENTRIES_PER_PAGE, 'total_pages' => total_viewable_pages, 'total_entries' => total_viewable_entries