We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19040f6 commit a30c30eCopy full SHA for a30c30e
1 file changed
lib/backpex/preferences/router.ex
@@ -378,8 +378,7 @@ defmodule Backpex.Preferences.Router do
378
# but not others, which contradicts the single-owner semantics that
379
# get_map/3 relies on. Only string patterns and :default participate here.
380
routes
381
- |> Enum.reject(&match_fun_route?/1)
382
- |> Enum.filter(&prefix_matches?(&1, prefix, prefix_segments))
+ |> Enum.filter(&(not match_fun_route?(&1) and prefix_matches?(&1, prefix, prefix_segments)))
383
|> Enum.max_by(&prefix_specificity(&1, prefix_segments), fn -> nil end)
384
end
385
0 commit comments