fix: fix 500 error when rendering chapters that don't exist

This commit is contained in:
Neetpone 2024-10-28 20:35:47 -04:00
parent 24991eb2cd
commit 7f2e60b5e0

View file

@ -54,6 +54,8 @@ class Ebook::EpubGenerator
end
markdown.render body.join("\n")
rescue NoMethodError
'<b>Something has gone wrong. We don\'t seem to have an archived copy of that chapter.</b>'.html_safe
end
def self.markdown