Skip to content

Commit

Permalink
Merge pull request #904 from City-of-Helsinki/UHF-X_pager_check
Browse files Browse the repository at this point in the history
UHF-X Pager check
  • Loading branch information
khalima authored Feb 6, 2024
2 parents a09e4a0 + d45b2a6 commit 0bba02f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ function hdbt_preprocess_pager(&$variables): void {
$pager_manager = \Drupal::service('pager.manager');
$pager = $pager_manager->getPager($element);
// Get the total pages in the pager.
$total_pages = $pager->getTotalPages();
$total_pages = isset($pager) ? $pager->getTotalPages() : 0;

$variables['total_pages'] = $total_pages;
}
Expand Down

0 comments on commit 0bba02f

Please sign in to comment.