Fix instance terms when contact is undefined

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-06-23 10:58:48 +02:00
parent 85fe326e20
commit 6981b54679
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -316,6 +316,9 @@ defmodule Mobilizon.Config do
contact = contact() contact = contact()
cond do cond do
is_nil(contact) ->
nil
String.contains?(contact, "@") -> String.contains?(contact, "@") ->
"<a href=\"mailto:#{contact}\">#{contact}</a>" "<a href=\"mailto:#{contact}\">#{contact}</a>"