0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fixed email newsletter error when post has no content

closes #12158
This commit is contained in:
Nazar Gargol 2020-08-24 19:46:46 +12:00
parent b8197023b3
commit 91d1417df2

View file

@ -109,7 +109,7 @@ const serialize = async (postModel, options = {isBrowserPreview: false}) => {
// we use post.excerpt as a hidden piece of text that is picked up by some email
// clients as a "preview" when listing emails. Our current plaintext/excerpt
// generation outputs links as "Link [https://url/]" which isn't desired in the preview
if (!post.custom_excerpt) {
if (!post.custom_excerpt && post.excerpt) {
post.excerpt = post.excerpt.replace(/\s\[http(.*?)\]/g, '');
}