From b24af52dfc7d9b8067758c5529edb794384eb4e0 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Fri, 10 Jan 2020 09:31:32 +0100 Subject: [PATCH] fix branch selector bug --- .../src/repos/codeSection/containers/CodeOverview.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]