diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/pages/projects/project.js | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/pages/projects/project.js')
-rw-r--r-- | app/assets/javascripts/pages/projects/project.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/app/assets/javascripts/pages/projects/project.js b/app/assets/javascripts/pages/projects/project.js index ef6953db83b..da8dc527d79 100644 --- a/app/assets/javascripts/pages/projects/project.js +++ b/app/assets/javascripts/pages/projects/project.js @@ -2,14 +2,14 @@ import $ from 'jquery'; import Cookies from 'js-cookie'; -import { __ } from '~/locale'; -import { mergeUrlParams } from '~/lib/utils/url_utility'; -import { serializeForm } from '~/lib/utils/forms'; -import axios from '~/lib/utils/axios_utils'; +import initClonePanel from '~/clone_panel'; +import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown'; import { deprecatedCreateFlash as flash } from '~/flash'; +import axios from '~/lib/utils/axios_utils'; +import { serializeForm } from '~/lib/utils/forms'; +import { mergeUrlParams } from '~/lib/utils/url_utility'; +import { __ } from '~/locale'; import projectSelect from '../../project_select'; -import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown'; -import initClonePanel from '~/clone_panel'; export default class Project { constructor() { @@ -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; } } |