mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Fix page > total redirecting to first page instead of last (#5321)
This commit is contained in:
parent
be6431ac13
commit
93a2ee1277
1 changed files with 1 additions and 1 deletions
|
|
@ -385,7 +385,7 @@ export function useEnsureValidPage(
|
|||
const totalPages = Math.ceil(totalCount / filter.itemsPerPage);
|
||||
|
||||
if (totalPages > 0 && filter.currentPage > totalPages) {
|
||||
setFilter((prevFilter) => prevFilter.changePage(1));
|
||||
setFilter((prevFilter) => prevFilter.changePage(totalPages));
|
||||
}
|
||||
}, [filter, totalCount, setFilter]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue