diff --git a/invokeai/frontend/web/src/features/nodes/store/nodesSlice.ts b/invokeai/frontend/web/src/features/nodes/store/nodesSlice.ts index b2825db783..1d9835f598 100644 --- a/invokeai/frontend/web/src/features/nodes/store/nodesSlice.ts +++ b/invokeai/frontend/web/src/features/nodes/store/nodesSlice.ts @@ -121,8 +121,9 @@ const nodesSlice = createSlice({ ) => { state.invocationTemplates = action.payload; }, - nodeEditorReset: () => { - return { ...initialNodesState }; + nodeEditorReset: (state) => { + state.nodes = []; + state.edges = []; }, setEditorInstance: (state, action) => { state.editorInstance = action.payload; @@ -133,10 +134,6 @@ const nodesSlice = createSlice({ loadFileEdges: (state, action: PayloadAction) => { state.edges = action.payload; }, - clearNodes: (state) => { - state.nodes = []; - state.edges = []; - }, }, extraReducers: (builder) => { builder.addCase(receivedOpenAPISchema.fulfilled, (state, action) => {