Skip to content

Commit

Permalink
chore(Dialyzer): If something other than a binary is passed to is_bur…
Browse files Browse the repository at this point in the history
…ner_domain? return true
  • Loading branch information
tomciopp committed Feb 9, 2022
1 parent 4ca003f commit 0dae67c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/burnex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ defmodule Burnex do
"""
@spec is_burner_domain?(binary()) :: boolean()
def is_burner_domain?(domain) do
def is_burner_domain?(domain) when is_binary(domain) do
case MapSet.member?(@providers, domain) do
false ->
case Regex.run(~r/^[^.]+[.](.+)$/, domain) do
Expand All @@ -85,6 +85,8 @@ defmodule Burnex do
end
end

def is_burner_domain?(_), do: true

@doc """
Returns a MapSet with all blocked domains providers.
Expand Down

0 comments on commit 0dae67c

Please sign in to comment.