Skip to content

Commit b617f23

Browse files
author
Rusty Geldmacher
committed
Removed unnecessary conditional in call!
If `options[:app]` has been set, then it wouldn't get to this code path, thus rendering the extra check in the call to `builder.run` unnecessary. This also has the effect of making this code a little easier to read.
1 parent 54aad37 commit b617f23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grape/endpoint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def call!(env)
188188
options[:app].call(env)
189189
else
190190
builder = build_middleware
191-
builder.run options[:app] || lambda { |arg| run(arg) }
191+
builder.run lambda { |arg| run(arg) }
192192
builder.call(env)
193193
end
194194
end

0 commit comments

Comments
 (0)