mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
handle case where user has no images
This commit is contained in:
committed by
psychedelicious
parent
84645495a9
commit
cbecf3cb89
@@ -158,7 +158,7 @@ export const gallerySlice = createSlice({
|
||||
|
||||
imagesAdapter.upsertMany(state, transformedItems);
|
||||
|
||||
if (state.selection.length === 0) {
|
||||
if (state.selection.length === 0 && items.length) {
|
||||
state.selection = [items[0].image_name];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user