Skip to content

Commit

Permalink
fix(scripts): Allow building ebooks without author metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Jan 20, 2021
1 parent 215dcf1 commit 1139788
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/toc2breaks.lua.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ infow(meta.title, true)
infow("SUBTITLE:")
infow(meta.subtitle, true)

for _, v in ipairs(meta.creator) do
if v.role == "author" then meta.author = v.text end
if meta.creator then
for _, v in ipairs(meta.creator) do
if v.role == "author" then meta.author = v.text end
end
end

infow("AUTHOR:" )
Expand Down

0 comments on commit 1139788

Please sign in to comment.