Skip to content

Commit

Permalink
Added branch name validation for space characters
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomura committed Feb 20, 2025
1 parent 42974a1 commit 11b2a80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/react/atlascode/startwork/StartWorkPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ const StartWorkPage: React.FunctionComponent = () => {

const handleLocalBranchChange = useCallback(
(event: React.ChangeEvent<{ name?: string | undefined; value: string }>) => {
// spaces are not allowed in branch names
event.target.value = event.target.value.replace(/ /g, '-');
setLocalBranch(event.target.value);
},
[setLocalBranch],
Expand Down

0 comments on commit 11b2a80

Please sign in to comment.