mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Delete clearnodes and change nodeEditorReset
This commit is contained in:
parent
ee253ea4f1
commit
b5e7384f09
@ -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<Edge[]>) => {
|
||||
state.edges = action.payload;
|
||||
},
|
||||
clearNodes: (state) => {
|
||||
state.nodes = [];
|
||||
state.edges = [];
|
||||
},
|
||||
},
|
||||
extraReducers: (builder) => {
|
||||
builder.addCase(receivedOpenAPISchema.fulfilled, (state, action) => {
|
||||
|
Loading…
Reference in New Issue
Block a user