mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Fix page > total redirecting to first page instead of last (#5321)
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user