Skip to content

Commit 5b2db6f

Browse files
authored
Merge pull request #883 from meeseeksmachine/auto-backport-of-pr-880-on-jlab-2
Backport PR #880 on branch jlab-2 (Force change the repository to a current one)
2 parents f8a2577 + 4c69b5d commit 5b2db6f

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)