diff --git a/invokeai/frontend/web/src/features/nodes/store/workflowSlice.ts b/invokeai/frontend/web/src/features/nodes/store/workflowSlice.ts index 6e54c9fe42..b97380052d 100644 --- a/invokeai/frontend/web/src/features/nodes/store/workflowSlice.ts +++ b/invokeai/frontend/web/src/features/nodes/store/workflowSlice.ts @@ -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 }); } }