mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
reload historyView on branch switch // cleanup Sources
This commit is contained in:
@@ -49,7 +49,7 @@ class Sources extends React.Component<Props> {
|
||||
return revision ? decodeURIComponent(revision) : revision;
|
||||
};
|
||||
|
||||
onSelectBranch = (branch?: Branch, replaceHistory?: boolean) => {
|
||||
onSelectBranch = (branch?: Branch) => {
|
||||
const { baseUrl, history, path } = this.props;
|
||||
let url;
|
||||
if (branch) {
|
||||
@@ -66,8 +66,8 @@ class Sources extends React.Component<Props> {
|
||||
};
|
||||
|
||||
evaluateSwitchViewLink = () => {
|
||||
const { baseUrl, selectedBranch } = this.props;
|
||||
if (selectedBranch) {
|
||||
const { baseUrl, selectedBranch, branches } = this.props;
|
||||
if (selectedBranch && branches?.filter(b => b.name === selectedBranch).length !== 0) {
|
||||
return `${baseUrl}/branch/${encodeURIComponent(selectedBranch)}/changesets/`;
|
||||
}
|
||||
return `${baseUrl}/changesets/`;
|
||||
|
||||
Reference in New Issue
Block a user