Skip to content

Commit

Permalink
fix: remove white space after duplicate schedule regex matching (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseycharleston authored Oct 10, 2024
1 parent dcc1d81 commit d73615e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/background/lib/handleDuplicate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d73615e

Please sign in to comment.