fix: remove white space after duplicate schedule regex matching (#286)
This commit is contained in:
@@ -20,7 +20,7 @@ export default async function handleDuplicate(scheduleName: string): Promise<str
|
|||||||
|
|
||||||
// Extract base name and existing index
|
// Extract base name and existing index
|
||||||
const match = scheduleName.match(regex);
|
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
|
// Extract number from parentheses and increment
|
||||||
let index = match && match[2] ? parseInt(match[2].slice(1, -1), 10) + 1 : 1;
|
let index = match && match[2] ? parseInt(match[2].slice(1, -1), 10) + 1 : 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user