fix: Email for document update can include empty diff block

This commit is contained in:
Tom Moor
2023-07-07 08:23:42 -04:00
parent 814bacbead
commit 8cc2853102
3 changed files with 34 additions and 6 deletions

View File

@@ -76,12 +76,14 @@ export default class DocumentPublishedOrUpdatedEmail extends BaseEmail<
});
// inline all css so that it works in as many email providers as possible.
body = await inlineCss(content, {
url: env.URL,
applyStyleTags: true,
applyLinkTags: false,
removeStyleTags: true,
});
body = content
? await inlineCss(content, {
url: env.URL,
applyStyleTags: true,
applyLinkTags: false,
removeStyleTags: true,
})
: undefined;
}
}