fallback branch

pull/3088/head
Aniket-Engg 2 years ago committed by Aniket
parent 324907c807
commit bfb35f324a
  1. 2
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -71,7 +71,7 @@ export const createWorkspace = async (workspaceName: string, workspaceTemplateNa
const workspacesPath = plugin.fileProviders.workspace.workspacesPath
const allBranches = await getGitRepoBranches(workspacesPath + '/' + workspaceName)
// selected branch will be 'master' or 'main'
const selectedBranch = allBranches[0].name
const selectedBranch = allBranches?.length ? allBranches[0].name : 'main'
await plugin.call('dGitProvider', 'init', { branch: selectedBranch })
dispatch(setCurrentWorkspaceCurrentBranch(selectedBranch))
const isActive = await plugin.call('manager', 'isActive', 'dgit')

Loading…
Cancel
Save