From eef24281631d93e764ecf5fccdf634f46af76203 Mon Sep 17 00:00:00 2001 From: Juan Carlos Garcia Date: Tue, 12 Dec 2023 09:43:25 +0100 Subject: [PATCH] fix(#1975): Apply suggestions --- lib/grape/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grape/api.rb b/lib/grape/api.rb index 628f9ddca9..ef6cb5cf35 100644 --- a/lib/grape/api.rb +++ b/lib/grape/api.rb @@ -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)