mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 00:46:23 +02:00
fix new tool name format
This commit is contained in:
parent
3a26aac949
commit
9a2ae7e632
1 changed files with 3 additions and 3 deletions
|
|
@ -277,10 +277,10 @@ function reducer(state: State, action: Action): State {
|
|||
if (isLive) {
|
||||
break;
|
||||
}
|
||||
let newToolName = "New tool";
|
||||
let newToolName = "new_tool";
|
||||
if (draft.workflow?.tools.some((tool) => tool.name === newToolName)) {
|
||||
newToolName = `New tool ${draft.workflow.tools.filter((tool) =>
|
||||
tool.name.startsWith("New tool")).length + 1}`;
|
||||
newToolName = `new_tool_${draft.workflow.tools.filter((tool) =>
|
||||
tool.name.startsWith("new_tool")).length + 1}`;
|
||||
}
|
||||
draft.workflow?.tools.push({
|
||||
name: newToolName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue