mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
handle case where user has no images
This commit is contained in:
parent
84645495a9
commit
cbecf3cb89
@ -158,7 +158,7 @@ export const gallerySlice = createSlice({
|
|||||||
|
|
||||||
imagesAdapter.upsertMany(state, transformedItems);
|
imagesAdapter.upsertMany(state, transformedItems);
|
||||||
|
|
||||||
if (state.selection.length === 0) {
|
if (state.selection.length === 0 && items.length) {
|
||||||
state.selection = [items[0].image_name];
|
state.selection = [items[0].image_name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user