diff --git a/app/lib/find_by_path.rb b/app/lib/find_by_path.rb index e41cb7b4..8d3a85ab 100644 --- a/app/lib/find_by_path.rb +++ b/app/lib/find_by_path.rb @@ -17,7 +17,10 @@ def find(path) return exact_match if exact_match matches = find_route_matches(path) - matches.any? ? best_route_match(matches, path) : nil + + if matches.count.positive? + best_route_match(matches, path) + end end private