diff --git a/scm-ui/ui-webapp/src/repos/codeSection/containers/CodeOverview.tsx b/scm-ui/ui-webapp/src/repos/codeSection/containers/CodeOverview.tsx index 0bdeb3fa4f..77d590bb2a 100644 --- a/scm-ui/ui-webapp/src/repos/codeSection/containers/CodeOverview.tsx +++ b/scm-ui/ui-webapp/src/repos/codeSection/containers/CodeOverview.tsx @@ -136,8 +136,8 @@ const mapStateToProps = (state: any, ownProps: Props) => { const loading = isFetchBranchesPending(state, repository); const branches = getBranches(state, repository); const selectedView = decodeURIComponent(location.pathname.split("/")[5]); - const selectedBranch = decodeURIComponent(location.pathname.split("/")[6]); - + const branchFromURL = decodeURIComponent(location.pathname.split("/")[6]); + const selectedBranch = branchFromURL && branchFromURL !== "undefined" ? branchFromURL : ""; return { error, loading, diff --git a/scm-ui/ui-webapp/src/repos/containers/ChangesetsRoot.tsx b/scm-ui/ui-webapp/src/repos/containers/ChangesetsRoot.tsx index 13129af208..dd81ef140a 100644 --- a/scm-ui/ui-webapp/src/repos/containers/ChangesetsRoot.tsx +++ b/scm-ui/ui-webapp/src/repos/containers/ChangesetsRoot.tsx @@ -3,6 +3,7 @@ import { Route, withRouter } from "react-router-dom"; import { WithTranslation, withTranslation } from "react-i18next"; import { Repository } from "@scm-manager/ui-types"; import Changesets from "./Changesets"; +import { compose } from "redux"; type Props = WithTranslation & { repository: Repository; @@ -42,4 +43,4 @@ class ChangesetsRoot extends React.Component { } } -export default withRouter(withTranslation("repos")(ChangesetsRoot)); +export default compose(withRouter, withTranslation("repos"))(ChangesetsRoot); diff --git a/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx b/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx index 56b705881c..2248f0239a 100644 --- a/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx +++ b/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx @@ -122,6 +122,11 @@ class RepositoryRoot extends React.Component {
+ + + + + } /> } />