Skip to content

Commit 53b9493

Browse files
NikolaySagneum
authored andcommitted
Set default branch to main for clone creation (#662)
1 parent 0fe7abe commit 53b9493

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • ui/packages/shared/pages/CreateClone

ui/packages/shared/pages/CreateClone/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ export const CreateClone = observer((props: Props) => {
114114

115115
const branches = (await stores.main.getBranches(props.instanceId)) ?? []
116116

117-
let initiallySelectedBranch = branches[0];
117+
const mainBranch = branches.find((branch) => branch.name === 'main')
118+
let initiallySelectedBranch = mainBranch?.name ?? branches[0];
118119

119120
if (initialBranch) {
120121
const foundBranch = branches.find((branch) => branch.name === initialBranch)

0 commit comments

Comments
 (0)