Skip to content

Commit

Permalink
improved redirect to index
Browse files Browse the repository at this point in the history
  • Loading branch information
evsasse committed Dec 13, 2024
1 parent 838d40d commit c4545d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ def bundled_html

if lookup_path.blank?
indexes = bundled_html_list_of_files.filter { |item| item[:name].include?("index.html") }
index = indexes.sort_by(&:length).first
index = indexes.sort_by { |item| item[:name].length }.first

redirect_to "#{request.original_url}/#{index}" if index.present?
redirect_to index[:href] if index.present?
return
end

Expand Down

0 comments on commit c4545d9

Please sign in to comment.