Skip to content

Commit

Permalink
But only if we actually added repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed Sep 27, 2016
1 parent e41c23c commit 49f4bc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/ui/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ export class App extends React.Component<IAppProps, IAppState> {

private async addRepositories(paths: string[]) {
const repositories = await this.props.dispatcher.addRepositories(paths)
this.props.dispatcher.selectRepository(repositories[0])
if (repositories.length) {
this.props.dispatcher.selectRepository(repositories[0])
}
}

private renderTitlebar() {
Expand Down

0 comments on commit 49f4bc7

Please sign in to comment.