diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b7a26e2..222c7355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - List page doesn't render nested list pages ([#365](https://github.com/jpanther/congo/issues/365)) - Pagination is duplicated on term pages ([#366](https://github.com/jpanther/congo/issues/366)) +- Link to last pagination page sometimes displays twice ## [2.4.0] - 2022-11-10 diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index 4228b332..3d8e88ec 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -59,7 +59,7 @@ {{- end }} {{- with .Last }} - {{- if lt $currentPageNumber (sub .TotalPages $width) }} + {{- if and (lt $currentPageNumber (sub .TotalPages $width)) (lt $end .TotalPages) }} {{- if lt $currentPageNumber (sub .TotalPages (add $width 1)) }}