mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
fix branch selector bug
This commit is contained in:
@@ -64,15 +64,15 @@ class CodeOverview extends React.Component<Props> {
|
|||||||
branchSelected = (branch?: Branch) => {
|
branchSelected = (branch?: Branch) => {
|
||||||
let splittedUrl = this.props.location.pathname.split("/");
|
let splittedUrl = this.props.location.pathname.split("/");
|
||||||
if (
|
if (
|
||||||
this.props.location.pathname.includes("/code/sources/") ||
|
this.props.location.pathname.includes("/code/sources") ||
|
||||||
this.props.location.pathname.includes("/code/branch/")
|
this.props.location.pathname.includes("/code/branch")
|
||||||
) {
|
) {
|
||||||
if (branch) {
|
if (branch) {
|
||||||
splittedUrl[6] = encodeURIComponent(branch.name);
|
splittedUrl[6] = encodeURIComponent(branch.name);
|
||||||
}
|
}
|
||||||
this.props.history.push(splittedUrl.join("/"));
|
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(
|
this.props.history.push(
|
||||||
`${splittedUrl[0]}/${splittedUrl[1]}/${splittedUrl[2]}/${splittedUrl[3]}/${
|
`${splittedUrl[0]}/${splittedUrl[1]}/${splittedUrl[2]}/${splittedUrl[3]}/${
|
||||||
splittedUrl[4]
|
splittedUrl[4]
|
||||||
|
|||||||
Reference in New Issue
Block a user