Skip to content

Commit

Permalink
fix error "undefined method each for nil" (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwwhiterabbit authored Aug 21, 2024
1 parent 9e47b08 commit fa51d1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ def options_with_versions(latest_versions, previous_versions)
latest_versions.map do |version|
ancestors = previous_versions.select { |ancestor| ancestor.id.in?(version.ancestor_ids) }
{ ancestors.last&.name || version.name => [[version.name, version.id]] + ancestors.map { |v| [v.name, v.id] } }
end.reduce(:merge)
end.reduce({}, :merge)
end
end

0 comments on commit fa51d1a

Please sign in to comment.