Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-14 15:09:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-14 15:09:51 +0300
commit9223573b85bcfdd21953f52e0d2c5cb587e366a1 (patch)
tree7dfd09536b948d560fc442014a95a221327b6567 /app/assets/javascripts/notes
parent1fc72cb8765dab466da8555b70eb744a53a74a80 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r--app/assets/javascripts/notes/components/diff_with_note.vue13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue
index 3c12ca70c2a..db32079e6b9 100644
--- a/app/assets/javascripts/notes/components/diff_with_note.vue
+++ b/app/assets/javascripts/notes/components/diff_with_note.vue
@@ -43,6 +43,15 @@ export default {
diffViewerMode() {
return this.discussion.diff_file.viewer.name;
},
+ fileDiffRefs() {
+ return this.discussion.diff_file.diff_refs;
+ },
+ headSha() {
+ return (this.fileDiffRefs ? this.fileDiffRefs.head_sha : this.discussion.commit_id) || '';
+ },
+ baseSha() {
+ return (this.fileDiffRefs ? this.fileDiffRefs.base_sha : this.discussion.commit_id) || '';
+ },
isTextFile() {
return this.diffViewerMode === diffViewerModes.text;
},
@@ -144,9 +153,9 @@ export default {
:diff-mode="diffMode"
:diff-viewer-mode="diffViewerMode"
:new-path="discussion.diff_file.new_path"
- :new-sha="discussion.diff_file.diff_refs.head_sha"
+ :new-sha="headSha"
:old-path="discussion.diff_file.old_path"
- :old-sha="discussion.diff_file.diff_refs.base_sha"
+ :old-sha="baseSha"
:file-hash="discussion.diff_file.file_hash"
:project-path="projectPath"
>