mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
minor pageable code error.
This commit is contained in:
parent
8c31af608b
commit
ecb4835a16
1 changed files with 2 additions and 2 deletions
|
@ -19,8 +19,8 @@ module.exports = function() {
|
|||
|
||||
originalEventHandler.apply(this, [].slice.call(arguments, 1));
|
||||
|
||||
var totalPages = Math.ceil(this.state.totalRecords / pageSize);
|
||||
var newPage = Math.min(currentPage, totalPages);
|
||||
var totalPages = Math.max(1,Math.ceil(this.state.totalRecords / pageSize));
|
||||
var newPage = Math.min(currentPage, totalPages);
|
||||
|
||||
if (newPage !== this.state.currentPage) {
|
||||
this.state.currentPage = newPage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue