fix(ui): unable to edit notes node title

This commit is contained in:
psychedelicious 2024-05-21 11:27:11 +10:00
parent bf4310ca71
commit 9ba47cae20

View File

@ -275,10 +275,9 @@ export const nodesSlice = createSlice({
const { nodeId, label } = action.payload;
const nodeIndex = state.nodes.findIndex((n) => n.id === nodeId);
const node = state.nodes?.[nodeIndex];
if (!isInvocationNode(node)) {
return;
}
if (isInvocationNode(node) || isNotesNode(node)) {
node.data.label = label;
}
},
nodeNotesChanged: (state, action: PayloadAction<{ nodeId: string; notes: string }>) => {
const { nodeId, notes } = action.payload;