mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-14 03:25:29 -05:00
fix(ui): reset selected ref image when replacing all
Fixes an unhandled error in a selector that can throw.
This commit is contained in:
@@ -57,6 +57,8 @@ export const refImagesSlice = createSlice({
|
||||
const { entities, replace } = action.payload;
|
||||
if (replace) {
|
||||
state.entities = entities;
|
||||
state.isPanelOpen = false;
|
||||
state.selectedEntityId = null;
|
||||
} else {
|
||||
state.entities.push(...entities);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user