fix: remove white space after duplicate schedule regex matching (#286)

This commit is contained in:
Casey Charleston
2024-10-09 20:21:26 -05:00
committed by GitHub
parent dcc1d81a74
commit d73615e281

View File

@@ -20,7 +20,7 @@ export default async function handleDuplicate(scheduleName: string): Promise<str
// Extract base name and existing index
const match = scheduleName.match(regex);
const baseName = match && match[1] ? match[1] : scheduleName;
const baseName = match && match[1] ? match[1].trim() : scheduleName;
// Extract number from parentheses and increment
let index = match && match[2] ? parseInt(match[2].slice(1, -1), 10) + 1 : 1;