Fixed issue with branch selector

This commit is contained in:
Philipp Czora
2018-12-14 20:20:00 +01:00
parent 5cb1a2e0cd
commit 161885ff12
2 changed files with 51 additions and 18 deletions

View File

@@ -79,6 +79,12 @@ class BranchSelector extends React.Component<Props, State> {
branchSelected = (branchName: string) => {
const { branches, selected } = this.props;
if (!branchName) {
this.setState({ selectedBranch: undefined });
selected(undefined);
return;
}
const branch = branches.find(b => b.name === branchName);
selected(branch);