We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba3b2bf commit 62cf767Copy full SHA for 62cf767
1 file changed
app/src/ui/toolbar/worktree-dropdown.tsx
@@ -58,6 +58,10 @@ export class WorktreeDropdown extends React.Component<
58
const { allWorktrees } = this.props.repositoryState.worktreesState
59
const mainWorktree = allWorktrees.find(wt => wt.type === 'main')
60
61
+ if (mainWorktree) {
62
+ setPreferredWorktreePath(mainWorktree.path, worktree.path)
63
+ }
64
+
65
const existingRepo = repositories.find(
66
r => r instanceof Repository && normalizePath(r.path) === worktreePath
67
)
@@ -77,10 +81,6 @@ export class WorktreeDropdown extends React.Component<
77
81
}
78
82
79
83
80
- if (mainWorktree) {
- setPreferredWorktreePath(mainWorktree.path, worktree.path)
- }
-
84
if (previousWorktreeRepo) {
85
await dispatcher.removeRepository(previousWorktreeRepo, false)
86
dispatcher.closeFoldout(FoldoutType.Repository)
0 commit comments