Commit 2bb8cb72 authored by Simon Knox's avatar Simon Knox

Merge branch '296667-fix-branch-change-with-line-selected' into 'master'

Fix bug branch change with line selected

See merge request gitlab-org/gitlab!52285
parents 0209de5d ede65b25
......@@ -126,8 +126,9 @@ export default class Project {
const refs = this.fullData.Branches.concat(this.fullData.Tags);
const currentRef = refs.find((ref) => loc.indexOf(ref) > -1);
if (currentRef) {
const targetPath = loc.split(currentRef)[1].slice(1);
const targetPath = loc.split(currentRef)[1].slice(1).split('#')[0];
selectedUrl.searchParams.set('path', targetPath);
selectedUrl.hash = window.location.hash;
}
}
......
---
title: Fix bug branch change with line selected
merge_request: 52285
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment