diff options
author | Valery Sizov <valery@gitlab.com> | 2017-05-30 23:38:06 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-05-31 18:38:10 +0300 |
commit | 563c1ca01cf94e125a5d01669e6e8455da257246 (patch) | |
tree | fc2c4dd7f85aee83c5574be87a3387afba959da5 /app/helpers | |
parent | 52a3d4372c6e45e4ffb792a9fe7bfca84f3573a3 (diff) |
Fix: A diff comment on a change at last line of a file shows as two comments in discussion
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/diff_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index 4c4fbdd4d39..5f3897b4f40 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -66,12 +66,12 @@ module DiffHelper discussions_left = discussions_right = nil - if left && (left.unchanged? || left.removed?) + if left && (left.unchanged? || left.discussable?) line_code = diff_file.line_code(left) discussions_left = @grouped_diff_discussions[line_code] end - if right && right.added? + if right&.discussable? line_code = diff_file.line_code(right) discussions_right = @grouped_diff_discussions[line_code] end |