From e25fc5d649e93ce62213bb1c67567b5813fba9d0 Mon Sep 17 00:00:00 2001
From: qusai Taha <q.taha@vardot.com>
Date: Thu, 18 Apr 2024 10:57:42 +0300
Subject: [PATCH] 3441714:fix duplicate last term in overview page

---
 core/modules/taxonomy/src/Form/OverviewTerms.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php
index 62fc76a6b61b..5b99033d6e99 100644
--- a/core/modules/taxonomy/src/Form/OverviewTerms.php
+++ b/core/modules/taxonomy/src/Form/OverviewTerms.php
@@ -197,7 +197,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular
       $back_step = $back_step ?? 0;
 
       // Continue rendering the tree until we reach the a new root item.
-      if ($page_entries >= $page_increment + $back_step + 1 && $raw_term->depth == 0 && $root_entries > 1) {
+      if ($page_entries >= $page_increment + $back_step && $raw_term->depth == 0 && $root_entries > 1) {
         $complete_tree = TRUE;
         // This new item at the root level is the first item on the next page.
         $after_entries++;
-- 
GitLab