Fix error on atom feed with no authors
This commit is contained in:
parent
13394e38f6
commit
c2323ae19a
|
@ -72,7 +72,13 @@ defmodule FeedParser.Parser.Atom do
|
||||||
_ -> nil
|
_ -> nil
|
||||||
end
|
end
|
||||||
|
|
||||||
author = texts('/entry/author/name/text()', entry) || feed_author
|
author =
|
||||||
|
texts('/entry/author/name/text()', entry) ||
|
||||||
|
feed_author
|
||||||
|
|> case do
|
||||||
|
nil -> nil
|
||||||
|
authors -> Enum.join(authors, ", ")
|
||||||
|
end
|
||||||
|
|
||||||
content = text('/entry/content/text()', entry) || text('/entry/summary/text()', entry)
|
content = text('/entry/content/text()', entry) || text('/entry/summary/text()', entry)
|
||||||
|
|
||||||
|
@ -83,7 +89,7 @@ defmodule FeedParser.Parser.Atom do
|
||||||
links: links,
|
links: links,
|
||||||
content: content,
|
content: content,
|
||||||
date: updated,
|
date: updated,
|
||||||
creator: author |> Enum.join(", ")
|
creator: author
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue