Skip to content

Commit

Permalink
fix(#1975): Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jcagarcia committed Dec 12, 2023
1 parent 3f5825d commit eef2428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grape/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def add_setup(method, *args, &block)
end

# Updating all previously mounted classes in the case that new methods have been executed.
if method != :mount && @setup.size > 1
if method != :mount && @setup.any?
previous_mount_steps = @setup.select { |step| step[:method] == :mount }
previous_mount_steps.each do |mount_step|
refresh_mount_step = mount_step.merge(method: :refresh_mounted_api)
Expand Down

0 comments on commit eef2428

Please sign in to comment.