add nil clause for Formatter.get_emoji/1 to return an empty result
This commit is contained in:
parent
d31bbb1cfe
commit
a9c0f395cb
2 changed files with 12 additions and 0 deletions
|
|
@ -157,6 +157,8 @@ defmodule Pleroma.Formatter do
|
|||
end)
|
||||
end
|
||||
|
||||
def get_emoji(nil), do: []
|
||||
|
||||
def get_emoji(text) do
|
||||
Enum.filter(@emoji, fn {emoji, _} -> String.contains?(text, ":#{emoji}:") end)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue