Replicate filter logic from BranchesList when determining if the list is empty or not

This commit is contained in:
Markus Olsson 2020-12-21 15:49:55 +01:00
parent b4a904eb27
commit cd80b6de6a

View file

@ -109,7 +109,9 @@ export class BranchDropdown extends React.Component<IBranchDropdownProps> {
} else if (tip.kind === TipState.Unborn) {
title = tip.ref
tooltip = `Current branch is ${tip.ref}`
canOpen = branchesState.allBranches.length > 0
canOpen = branchesState.allBranches.some(
b => !b.isDesktopForkRemoteBranch
)
} else if (tip.kind === TipState.Detached) {
title = `On ${tip.currentSha.substr(0, 7)}`
tooltip = 'Currently on a detached HEAD'