diff options
author | Igor <idrozdov@gitlab.com> | 2019-05-28 07:12:29 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-28 07:12:29 +0000 |
commit | c92db3db71dc261d547bb08873fdafeff9be98dc (patch) | |
tree | f39670dd29b85f3cfba4232c0e272de7504da4ba /lib | |
parent | 6da066c16d5db1e41444448816419b156ebf579b (diff) | |
download | gitlab-ce-c92db3db71dc261d547bb08873fdafeff9be98dc.tar.gz |
Fix removing empty lines via suggestions
Before this fix, a suggestion which just removes
an empty line wasn't appliable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/suggestion.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/diff/suggestion.rb b/lib/gitlab/diff/suggestion.rb index 027c7a31bcf..4a3ac2106e2 100644 --- a/lib/gitlab/diff/suggestion.rb +++ b/lib/gitlab/diff/suggestion.rb @@ -33,6 +33,8 @@ module Gitlab end def to_content + return "" if @text.blank? + # The parsed suggestion doesn't have information about the correct # ending characters (we may have a line break, or not), so we take # this information from the last line being changed (last |