Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix page num style (and add guard against NaN). (#3715)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Nov 2, 2017
1 parent 1450218 commit 0e39d3e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/pages/shotindex/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Body extends React.Component {
return null;
}

let totalPages = Math.ceil(this.props.totalShots / this.props.shotsPerPage);
let totalPages = Math.ceil(this.props.totalShots / this.props.shotsPerPage) || 1;
let hasPrev = this.props.pageNumber > 1;
let prevPageNumber = this.props.pageNumber - 1;
let prevClasses = ["shots-page-nav"].concat(!hasPrev && "disabled").join(' ');
Expand Down
1 change: 0 additions & 1 deletion static/css/shot-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ h1 {
}

span {
display: inline-block;
vertical-align: middle;
width: 40px;

Expand Down

0 comments on commit 0e39d3e

Please sign in to comment.