Make 'to' field undefined if empty for consistent validation
This commit is contained in:
parent
6d46d85b51
commit
75a21974c6
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue