Select current revision in selector if it is a branch

This commit is contained in:
René Pfeuffer
2018-10-23 11:24:23 +02:00
parent 0834420e4b
commit fa7626619c
2 changed files with 9 additions and 1 deletions

View File

@@ -79,11 +79,12 @@ class Sources extends React.Component<Props> {
}
renderBranchSelector = () => {
const { repository, branches } = this.props;
const { repository, branches, revision } = this.props;
if (repository._links.branches) {
return (
<BranchSelector
branches={branches}
selectedBranch={revision}
selected={(b: Branch) => {
this.branchSelected(b);
}}