mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix neg pages
This commit is contained in:
parent
3a531a3c88
commit
66e25628c3
@ -52,7 +52,7 @@ export const useGalleryPagination = (pageButtonsPerSide: number = 2) => {
|
||||
|
||||
// handle when total/pages decrease and user is on high page number (ie bulk removing or deleting)
|
||||
useEffect(() => {
|
||||
if (currentPage + 1 > pages) {
|
||||
if (pages && currentPage + 1 > pages) {
|
||||
goToLast();
|
||||
}
|
||||
}, [currentPage, pages, goToLast]);
|
||||
|
Loading…
Reference in New Issue
Block a user