mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix crash when removing last image
This commit is contained in:
parent
eab18c7385
commit
fe33acedad
@ -52,8 +52,8 @@ export const nextPrevImageButtonsSelector = createSelector(
|
|||||||
|
|
||||||
const prevImageIndex = clamp(currentImageIndex - 1, 0, images.length - 1);
|
const prevImageIndex = clamp(currentImageIndex - 1, 0, images.length - 1);
|
||||||
|
|
||||||
const nextImageId = images[nextImageIndex].image_name;
|
const nextImageId = images[nextImageIndex]?.image_name;
|
||||||
const prevImageId = images[prevImageIndex].image_name;
|
const prevImageId = images[prevImageIndex]?.image_name;
|
||||||
|
|
||||||
const nextImage = selectors.selectById(data, nextImageId);
|
const nextImage = selectors.selectById(data, nextImageId);
|
||||||
const prevImage = selectors.selectById(data, prevImageId);
|
const prevImage = selectors.selectById(data, prevImageId);
|
||||||
|
Loading…
Reference in New Issue
Block a user