Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3ff40b0

Browse files
committedApr 7, 2025·
fix(ui): use getDefaultForm when resetting form
1 parent 8743c9f commit 3ff40b0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed
 

‎invokeai/frontend/web/src/features/nodes/store/workflowSlice.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import type {
2626
WorkflowV3,
2727
} from 'features/nodes/types/workflow';
2828
import {
29-
buildContainer,
3029
getDefaultForm,
3130
isContainerElement,
3231
isHeadingElement,
@@ -116,11 +115,7 @@ export const workflowSlice = createSlice({
116115
state.id = action.payload;
117116
},
118117
formReset: (state) => {
119-
const rootElement = buildContainer('column', []);
120-
state.form = {
121-
elements: { [rootElement.id]: rootElement },
122-
rootElementId: rootElement.id,
123-
};
118+
state.form = getDefaultForm();
124119
},
125120
formElementAdded: (
126121
state,

0 commit comments

Comments
 (0)
Please sign in to comment.