remove the trailing #xx when copy

This commit is contained in:
Patrickill
2024-09-13 11:59:41 +08:00
committed by shilin66
parent ef1d9b2aa9
commit ecc73b036e

View File

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