]> source.dussan.org Git - gitea.git/commitdiff
fix calculation for finalPage in repo-search component (#16382)
author6543 <6543@obermui.de>
Tue, 13 Jul 2021 14:05:27 +0000 (16:05 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Jul 2021 14:05:27 +0000 (16:05 +0200)
Co-authored-by: Jan Naahs <jan.naahs@naahstea.de>
web_src/js/index.js

index 7a76b89f9b584fd127dfbf2dbc1bcbc52cf76b1a..6156429deb6c6156f6eaa4a1320d25d392363008 100644 (file)
@@ -3389,7 +3389,7 @@ function initVueComponents() {
               this.reposTotalCount = count;
             }
             Vue.set(this.counts, `${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`, count);
-            this.finalPage = Math.floor(count / this.searchLimit) + 1;
+            this.finalPage = Math.ceil(count / this.searchLimit);
             this.updateHistory();
           }
         }).always(() => {