lib/nexmo_developer/app/presenters/sidenav.rb in station-0.4.4 vs lib/nexmo_developer/app/presenters/sidenav.rb in station-0.4.5

- old
+ new

@@ -18,9 +18,19 @@ @nav_items ||= items.map do |item| if @request_path && @request_path.split('/')[1].include?(item[:title]) SidenavItem.new(folder: item, sidenav: self) end end.compact + + if @nav_items.blank? + @nav_items = items.map do |item| + if @product && @product.split('/')[1] && @product.split('/')[1].include?(item[:title]) + SidenavItem.new(folder: item, sidenav: self) + end + end.compact + end + + @nav_items end def namespace @namespace.presence || 'documentation' end