summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/status/factory.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/status/factory.rb')
-rw-r--r--lib/gitlab/ci/status/factory.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/ci/status/factory.rb b/lib/gitlab/ci/status/factory.rb
index 3446644eff8..2a0bf060c9b 100644
--- a/lib/gitlab/ci/status/factory.rb
+++ b/lib/gitlab/ci/status/factory.rb
@@ -34,11 +34,9 @@ module Gitlab
def extended_statuses
return @extended_statuses if defined?(@extended_statuses)
- groups = self.class.extended_statuses.map do |group|
+ @extended_statuses = self.class.extended_statuses.flat_map do |group|
Array(group).find { |status| status.matches?(@subject, @user) }
- end
-
- @extended_statuses = groups.flatten.compact
+ end.compact
end
def self.extended_statuses