Skip to content

Commit

Permalink
Fix ReferenceError
Browse files Browse the repository at this point in the history
  • Loading branch information
tosametal committed Jul 11, 2019
1 parent 1520d93 commit 432b8bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion digdag-ui/console.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ class Pagination extends React.Component {
} else {
const mid = Math.ceil(pageCount / 2);

if (currentPage <= 3 || currentPage >= pageCount - 1 || (currentPage >= m - 1 && currentPage <= m + 1)) {
if (currentPage <= 3 || currentPage >= pageCount - 1 || (currentPage >= mid - 1 && currentPage <= mid + 1)) {
const pageNumbers = [1, 2, 3, mid - 1, mid, mid + 1, pageCount - 1, pageCount];
const buttons = this.createPageButtons(pageNumbers, currentPage, router, location);
buttons.splice(6, 0, <DisabledButton/>);
Expand Down

0 comments on commit 432b8bc

Please sign in to comment.