remove the trailing #xx when copy

This commit is contained in:
Patrickill
2024-09-13 11:59:41 +08:00
committed by Archer
parent d8b2887625
commit 3e144c4227

View File

@@ -27,7 +27,9 @@ export const useWorkflowUtils = () => {
} }
} }
}).length; }).length;
return nodeLength > 0 ? `${templateName}#${nodeLength + 1}` : templateName; return nodeLength > 0
? `${templateName.replace(/#\d+$/, '')}#${nodeLength + 1}`
: templateName;
}, },
[nodeList] [nodeList]
); );