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 'lib/sidebars/menu.rb')
-rw-r--r--lib/sidebars/menu.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sidebars/menu.rb b/lib/sidebars/menu.rb
index d9d294ff982..dfd88c99a0c 100644
--- a/lib/sidebars/menu.rb
+++ b/lib/sidebars/menu.rb
@@ -43,7 +43,7 @@ module Sidebars
# Value from menus is something like: [{ path: 'foo', path: 'bar', controller: :foo }]
# This method filters the information and returns: { path: ['foo', 'bar'], controller: :foo }
def all_active_routes
- @all_active_routes ||= begin
+ @all_active_routes ||=
([active_routes] + renderable_items.map(&:active_routes)).flatten.each_with_object({}) do |pairs, hash|
pairs.each do |k, v|
hash[k] ||= []
@@ -53,7 +53,6 @@ module Sidebars
hash
end
- end
end
# Returns whether the menu has any menu item, no