diff --git a/scm-ui/src/repos/containers/BranchRoot.js b/scm-ui/src/repos/containers/BranchRoot.js index b20edad284..c60dc7281a 100644 --- a/scm-ui/src/repos/containers/BranchRoot.js +++ b/scm-ui/src/repos/containers/BranchRoot.js @@ -85,16 +85,26 @@ class BranchRoot extends React.Component { return ( <> + {this.renderBranchSelector()} + changesets} /> + + ); + } + + renderBranchSelector = () => { + const { repository, branches } = this.props; + if (repository._links.branches) { + return ( { this.branchSelected(b); }} /> - changesets} /> - - ); - } + ); + } + return null; + }; } const mapDispatchToProps = dispatch => {