Skip to content

Commit 8375459

Browse files
authored
Merge pull request #880 from ktaletsk:sidebar-bug
Force change the repository to a current one
2 parents fd22f2d + 315138b commit 8375459

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/GitPanel.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,16 @@ export class GitPanel extends React.Component<IGitPanelProps, IGitPanelState> {
114114
*/
115115
constructor(props: IGitPanelProps) {
116116
super(props);
117+
const { branches, currentBranch, pathRepository } = props.model;
117118

118119
this.state = {
119-
branches: [],
120-
currentBranch: '',
120+
branches: branches,
121+
currentBranch: currentBranch ? currentBranch.name : 'master',
121122
files: [],
122123
nCommitsAhead: 0,
123124
nCommitsBehind: 0,
124125
pastCommits: [],
125-
repository: null,
126+
repository: pathRepository,
126127
tab: 0
127128
};
128129
}

0 commit comments

Comments
 (0)