Skip to content

Commit 7489bc9

Browse files
committed
De-duplicate router logic.
1 parent 717ae8b commit 7489bc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/grape/router.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ def transaction(env)
103103
neighbor.endpoint
104104
) if neighbor && method == 'OPTIONS' && !cascade
105105

106-
return neighbor.endpoint.call(env) if neighbor && cascade && match?(input, '*')
107-
108106
route = match?(input, '*')
107+
return neighbor.endpoint.call(env) if neighbor && cascade && route
108+
109109
if route
110110
response = process_route(route, env)
111111
return response if response && !(cascade = cascade?(response))

0 commit comments

Comments
 (0)