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 5e45dbf3ad..c48bc7d34c 100644 --- a/scm-ui/ui-webapp/src/repos/codeSection/containers/CodeOverview.tsx +++ b/scm-ui/ui-webapp/src/repos/codeSection/containers/CodeOverview.tsx @@ -64,15 +64,15 @@ class CodeOverview extends React.Component { branchSelected = (branch?: Branch) => { let splittedUrl = this.props.location.pathname.split("/"); if ( - this.props.location.pathname.includes("/code/sources/") || - this.props.location.pathname.includes("/code/branch/") + this.props.location.pathname.includes("/code/sources") || + this.props.location.pathname.includes("/code/branch") ) { if (branch) { splittedUrl[6] = encodeURIComponent(branch.name); } this.props.history.push(splittedUrl.join("/")); } - if (this.props.location.pathname.includes("/code/changesets/")) { + if (this.props.location.pathname.includes("/code/changesets")) { this.props.history.push( `${splittedUrl[0]}/${splittedUrl[1]}/${splittedUrl[2]}/${splittedUrl[3]}/${ splittedUrl[4]