mirror of
https://github.com/stashapp/stash.git
synced 2026-05-08 12:32:29 +02: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);
|
const totalPages = Math.ceil(totalCount / filter.itemsPerPage);
|
||||||
|
|
||||||
if (totalPages > 0 && filter.currentPage > totalPages) {
|
if (totalPages > 0 && filter.currentPage > totalPages) {
|
||||||
setFilter((prevFilter) => prevFilter.changePage(1));
|
setFilter((prevFilter) => prevFilter.changePage(totalPages));
|
||||||
}
|
}
|
||||||
}, [filter, totalCount, setFilter]);
|
}, [filter, totalCount, setFilter]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue