mirror of
https://github.com/desktop/desktop
synced 2024-09-18 07:32:01 +00:00
Fix button availability regression
This commit is contained in:
parent
b92c946653
commit
19ba6c87d3
|
@ -44,7 +44,7 @@ export function canStartOperation(
|
|||
return false
|
||||
}
|
||||
|
||||
return statusKind === ComputedAction.Clean
|
||||
return statusKind !== ComputedAction.Invalid
|
||||
}
|
||||
|
||||
export interface IBaseChooseBranchDialogProps {
|
||||
|
|
|
@ -116,17 +116,14 @@ export class MergeChooseBranchDialog extends React.Component<
|
|||
return
|
||||
}
|
||||
|
||||
// The clean status is the only one that needs the ahead/behind count. If
|
||||
// the status is conflicts or invalid, update the UI here and end the
|
||||
// function.
|
||||
if (
|
||||
mergeStatus.kind === ComputedAction.Conflicts ||
|
||||
mergeStatus.kind === ComputedAction.Invalid
|
||||
) {
|
||||
// Can't go forward if the merge status is invalid, no need to check commit count
|
||||
if (mergeStatus.kind === ComputedAction.Invalid) {
|
||||
this.setState({ mergeStatus })
|
||||
return
|
||||
}
|
||||
|
||||
// Commit count is used in the UI output as well as determining whether the
|
||||
// submit button is enabled
|
||||
const range = revSymmetricDifference('', branch.name)
|
||||
const aheadBehind = await getAheadBehind(this.props.repository, range)
|
||||
const commitCount = aheadBehind ? aheadBehind.behind : 0
|
||||
|
|
Loading…
Reference in a new issue