mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
dont redirect to default branch on changesets view
This commit is contained in:
@@ -15,14 +15,6 @@ type Props = WithTranslation &
|
||||
};
|
||||
|
||||
class ChangesetsRoot extends React.Component<Props> {
|
||||
componentDidMount() {
|
||||
const { branches, baseUrl } = this.props;
|
||||
if (branches?.length > 0 && this.isSelectedBranchNotABranch()) {
|
||||
const defaultBranch = branches?.filter(b => b.defaultBranch === true)[0];
|
||||
this.props.history.replace(`${baseUrl}/branch/${encodeURIComponent(defaultBranch.name)}/changesets/`);
|
||||
}
|
||||
}
|
||||
|
||||
stripEndingSlash = (url: string) => {
|
||||
if (url.endsWith("/")) {
|
||||
return url.substring(0, url.length - 1);
|
||||
|
||||
Reference in New Issue
Block a user