html: don't attempt to parse nil content
authorWilliam Pitcock <nenolod@dereferenced.org>
Tue, 5 Feb 2019 05:06:17 +0000 (05:06 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Tue, 5 Feb 2019 05:06:17 +0000 (05:06 +0000)
lib/pleroma/html.ex

index bf5daa9482bdb1da279502b5a8c5b937f805d5fc..b4a4742ee30c39699e0ecaf079a8226415ead5f3 100644 (file)
@@ -59,6 +59,8 @@ defmodule Pleroma.HTML do
     end)
   end
 
+  def extract_first_external_url(_, nil), do: {:error, "No content"}
+
   def extract_first_external_url(object, content) do
     key = "URL|#{object.id}"