mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
account for cases when body may be nil
This commit is contained in:
parent
77e689e29a
commit
2ad2a4347f
1 changed files with 2 additions and 2 deletions
|
@ -16,12 +16,12 @@ defmodule PhilomenaWeb.MarkdownRenderer do
|
|||
representations =
|
||||
collection
|
||||
|> Enum.flat_map(fn %{body: text} ->
|
||||
find_images(text)
|
||||
find_images(text || "")
|
||||
end)
|
||||
|> render_representations(conn)
|
||||
|
||||
Enum.map(collection, fn %{body: text} ->
|
||||
Markdown.to_html(text, representations)
|
||||
Markdown.to_html(text || "", representations)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue