Skip to content

Commit

Permalink
Fix exception with empty author name (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
canac authored Feb 16, 2023
1 parent dec127f commit af0fe9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions samples/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
</media:group>
</entry>
<entry>
<author>
<name></name>
<email>[email protected]</email>
</author>
<title type="xhtml"><div><img src="test" /><img src="test2" /></div></title>
<summary type="xhtml"><div><img src="test" /><img src="test2" /></div></summary>
</entry>
Expand Down
2 changes: 1 addition & 1 deletion src/mappers/mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ const mapAtomToFeed = (atom: InternalAtom): Feed => {
if (author) {
entry.author = {
email: author.email?.value,
name: author.name.value,
name: author.name?.value,
uri: author.uri?.value,
};
}
Expand Down

0 comments on commit af0fe9b

Please sign in to comment.