summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes.js
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-10-21 16:19:04 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-10-21 16:19:04 +0100
commit3176eb83b6da5a66d6a506c7967f434732ae6864 (patch)
treef28c95d169b0e360dcbf17fba9a3c772e057fa49 /app/assets/javascripts/notes.js
parent9c3f094a2f7609386ed182e4d5f6f9e7f6938388 (diff)
downloadgitlab-ce-3176eb83b6da5a66d6a506c7967f434732ae6864.tar.gz
Added discussion_line_code value to note response and use it to query the right row for the discussion UI
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r--app/assets/javascripts/notes.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 9c008da1a5d..cf247a4c170 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -414,7 +414,8 @@ export default class Notes {
}
this.note_ids.push(noteEntity.id);
form = $form || $(`.js-discussion-note-form[data-discussion-id="${noteEntity.discussion_id}"]`);
- row = form.closest('tr');
+
+ row = form.length ? form.closest('tr') : $(`#${noteEntity.discussion_line_code}`);
if (noteEntity.on_image) {
row = form;