mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +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 =
|
representations =
|
||||||
collection
|
collection
|
||||||
|> Enum.flat_map(fn %{body: text} ->
|
|> Enum.flat_map(fn %{body: text} ->
|
||||||
find_images(text)
|
find_images(text || "")
|
||||||
end)
|
end)
|
||||||
|> render_representations(conn)
|
|> render_representations(conn)
|
||||||
|
|
||||||
Enum.map(collection, fn %{body: text} ->
|
Enum.map(collection, fn %{body: text} ->
|
||||||
Markdown.to_html(text, representations)
|
Markdown.to_html(text || "", representations)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue