lib/contrast/framework/sinatra/support.rb in contrast-agent-4.13.1 vs lib/contrast/framework/sinatra/support.rb in contrast-agent-4.14.0

- old
+ new

@@ -104,10 +104,11 @@ # @return [Array[Sinatra::Base, Mustermann::Sinatra], nil] Either the controller that # will handle the route along with the route pattern or nil if no match. def _route_recurse controller, method, route return if controller.nil? || controller.cs__class == NilClass - route_patterns = controller.routes.fetch(method) { [] }.map(&:first) + route_patterns = controller.routes.fetch(method) { [] }. + map(&:first) route_pattern = route_patterns&.find do |matcher| matcher.params(route) # ::Mustermann::Sinatra match. end return controller, route_pattern if route_pattern