Pleroma.Web.ActivityPub.Builder: fix dialyzer error
lib/pleroma/web/activity_pub/builder.ex:115:pattern_match The pattern can never match the type. Pattern: _emojo = %{:file => _path} Type: nil | binary()
This commit is contained in:
parent
3fbe8ada93
commit
2062e126f1
@ -51,12 +51,12 @@ defmodule Pleroma.Emoji do
|
|||||||
end
|
end
|
||||||
|
|
||||||
@doc "Returns the path of the emoji `name`."
|
@doc "Returns the path of the emoji `name`."
|
||||||
@spec get(String.t()) :: String.t() | nil
|
@spec get(String.t()) :: Emoji.t() | nil
|
||||||
def get(name) do
|
def get(name) do
|
||||||
name = maybe_strip_name(name)
|
name = maybe_strip_name(name)
|
||||||
|
|
||||||
case :ets.lookup(@ets, name) do
|
case :ets.lookup(@ets, name) do
|
||||||
[{_, path}] -> path
|
[{_, emoji}] -> emoji
|
||||||
_ -> nil
|
_ -> nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user