mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-01 17:14:58 -05:00
fix(ui): remove node field from form correctly when node is deleted
This commit is contained in:
@@ -302,7 +302,7 @@ export const workflowSlice = createSlice({
|
||||
const removeIndex = action.payload.findLastIndex((change) => change.type === 'remove' && change.id === nodeId);
|
||||
const addIndex = action.payload.findLastIndex((change) => change.type === 'add' && change.item.id === nodeId);
|
||||
if (removeIndex > addIndex) {
|
||||
delete state.form?.elements[el.id];
|
||||
removeElement({ formState: state.form, id: el.id });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user