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:
Diffstat (limited to 'app/models/error_tracking/error_event.rb')
-rw-r--r--app/models/error_tracking/error_event.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/error_tracking/error_event.rb b/app/models/error_tracking/error_event.rb
index 686518a39fb..b4892e5c66b 100644
--- a/app/models/error_tracking/error_event.rb
+++ b/app/models/error_tracking/error_event.rb
@@ -61,9 +61,9 @@ class ErrorTracking::ErrorEvent < ApplicationRecord
pre_context = entry['pre_context']
post_context = entry['post_context']
- context += lines_with_position(pre_context, error_line_no - pre_context.size)
+ context += lines_with_position(pre_context, error_line_no - pre_context.size) if pre_context
context += lines_with_position([error_line], error_line_no)
- context += lines_with_position(post_context, error_line_no + 1)
+ context += lines_with_position(post_context, error_line_no + 1) if post_context
context.reject(&:blank?)
end