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 6ce981e commit 838d40d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def bundled_html
return if @report.pending?

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

redirect_to "#{request.original_url}/#{index}" if index.present?
Expand Down

0 comments on commit 838d40d

Please sign in to comment.