diff --git a/helpers/config_helper.rb b/helpers/config_helper.rb index 2921958b87..9977c461ab 100644 --- a/helpers/config_helper.rb +++ b/helpers/config_helper.rb @@ -8,7 +8,7 @@ def versions end def versions_grouped_by_status - versions.reverse.group_by { status(_1) } + versions.select {|version| documentation_path(current_page_without_version, version) }.reverse.group_by { status(_1) } end private diff --git a/source/partials/_commands_sidebar.haml b/source/partials/_commands_sidebar.haml index 7c7e523585..ef449a8bb4 100644 --- a/source/partials/_commands_sidebar.haml +++ b/source/partials/_commands_sidebar.haml @@ -6,7 +6,7 @@ %optgroup{label: status} - _versions.each do |version| - selected = version == current_visible_version - - value = documentation_path(current_page_without_version, version) || documentation_path('bundle-install.1', version) + - value = documentation_path(current_page_without_version, version) %option{selected: selected, value: value} = version %h4 General