Make 'to' field undefined if empty for consistent validation

This commit is contained in:
Mel O'Hagan 2022-05-20 13:59:29 +01:00
parent 3fe48343f6
commit 4d2159f354
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ exports.run = async function ({ inputs }) {
if (!contents) { if (!contents) {
contents = "<h1>No content</h1>" contents = "<h1>No content</h1>"
} }
to = to || undefined
try { try {
let response = await sendSmtpEmail(to, from, subject, contents, true) let response = await sendSmtpEmail(to, from, subject, contents, true)
return { return {