From 71636e3e074d5558d4ba53e7f8fe5035e6f58618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maren=20S=C3=BCwer?= Date: Wed, 28 Nov 2018 08:59:18 +0100 Subject: [PATCH] use correct page numbers --- scm-ui/src/repos/sources/containers/HistoryView.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scm-ui/src/repos/sources/containers/HistoryView.js b/scm-ui/src/repos/sources/containers/HistoryView.js index 52f8f45512..77806d38b2 100644 --- a/scm-ui/src/repos/sources/containers/HistoryView.js +++ b/scm-ui/src/repos/sources/containers/HistoryView.js @@ -64,14 +64,16 @@ class HistoryView extends React.Component { updatePage(page: number) { const { file } = this.props; - - this.updateHistory(file._links.history.href + "?page=" + page.toString()); + const internalPage = page - 1; + this.updateHistory( + file._links.history.href + "?page=" + internalPage.toString() + ); } showHistory() { const { repository } = this.props; const { changesets, page, pageCollection } = this.state; - const currentPage = page == 0 ? 1 : page; + const currentPage = page + 1; return ( <>