summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/diff/highlight.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/diff/highlight.rb b/lib/gitlab/diff/highlight.rb
index 14cf98e24a2..0b6a348acbc 100644
--- a/lib/gitlab/diff/highlight.rb
+++ b/lib/gitlab/diff/highlight.rb
@@ -73,7 +73,7 @@ module Gitlab
# Only update text if line is found. This will prevent
# issues with submodules given the line only exists in diff content.
- line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if line
+ line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if highlighted_line
end
@lines