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 { nodeId, label } = action.payload;
const nodeIndex = state.nodes.findIndex((n) => n.id === nodeId); const nodeIndex = state.nodes.findIndex((n) => n.id === nodeId);
const node = state.nodes?.[nodeIndex]; const node = state.nodes?.[nodeIndex];
if (!isInvocationNode(node)) { if (isInvocationNode(node) || isNotesNode(node)) {
return; node.data.label = label;
} }
node.data.label = label;
}, },
nodeNotesChanged: (state, action: PayloadAction<{ nodeId: string; notes: string }>) => { nodeNotesChanged: (state, action: PayloadAction<{ nodeId: string; notes: string }>) => {
const { nodeId, notes } = action.payload; const { nodeId, notes } = action.payload;