diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 00:10:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 00:10:47 +0300 |
commit | 355a4a17ebbeb246e48954462163577ae77f45c0 (patch) | |
tree | 81aac8e172af511d87fcb9541508f69508bede84 /app/assets/javascripts/notes | |
parent | 7488eeff6fdf82ee7b926d684a201212b0509cbb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r-- | app/assets/javascripts/notes/components/noteable_discussion.vue | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index 1c98904aacc..a5939e1023c 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -89,7 +89,6 @@ export default { }; }, computed: { - ...mapGetters('diffs', ['getDiffFileByHash']), ...mapGetters([ 'convertedDisscussionIds', 'getNoteableData', @@ -98,8 +97,16 @@ export default { 'getUserData', ]), diffFile() { - if (!this.discussion.diff_file) return null; - return this.getDiffFileByHash(this.discussion.diff_file.file_hash); + const diffFile = this.discussion.diff_file; + if (!diffFile) return null; + + return { + ...diffFile, + view_path: window.location.href.replace( + /\/-\/merge_requests.*/, + `/-/blob/${diffFile.content_sha}/${diffFile.new_path}`, + ), + }; }, currentUser() { return this.getUserData; |