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-09 15:11:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-09 15:11:14 +0300
commit3fd585614449ccab7fdab083f210c09eb16a6ed2 (patch)
tree225d8bdfcd0bfd5efe0da44348dd97be558be288 /app/assets/javascripts/notes
parent8b50d36626f3a71a2d8552a316d700510559b0de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r--app/assets/javascripts/notes/mixins/diff_line_note_form.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/notes/mixins/diff_line_note_form.js b/app/assets/javascripts/notes/mixins/diff_line_note_form.js
index 1ea78f18aca..55a63212dc5 100644
--- a/app/assets/javascripts/notes/mixins/diff_line_note_form.js
+++ b/app/assets/javascripts/notes/mixins/diff_line_note_form.js
@@ -58,7 +58,7 @@ export default {
const position =
positionType ||
(this.diffFileCommentForm ? IMAGE_DIFF_POSITION_TYPE : TEXT_DIFF_POSITION_TYPE);
- const selectedDiffFile = this.getDiffFileByHash(this.diffFileHash);
+ const diffFile = this.diffFile || this.file;
const postData = getDraftFormData({
note,
notesData: this.notesData,
@@ -66,7 +66,7 @@ export default {
noteableType: this.noteableType,
noteTargetLine: this.noteTargetLine,
diffViewType: this.diffViewType,
- diffFile: selectedDiffFile,
+ diffFile,
linePosition: this.position,
positionType: position,
...this.diffFileCommentForm,
@@ -74,7 +74,7 @@ export default {
showWhitespace: this.showWhitespace,
});
- const diffFileHeadSha = this.commit && this?.diffFile?.diff_refs?.head_sha;
+ const diffFileHeadSha = this.commit && diffFile?.diff_refs?.head_sha;
postData.data.note.commit_id = diffFileHeadSha || null;
@@ -85,7 +85,7 @@ export default {
} else if (this.line?.line_code) {
this.handleClearForm(this.line.line_code);
} else if (position === FILE_DIFF_POSITION_TYPE) {
- this.toggleFileCommentForm(this.diffFile.file_path);
+ this.toggleFileCommentForm(diffFile.file_path);
}
})
.catch(() => {