mirror of https://github.com/eleith/emailjs.git
smtp/client: fix type error in bundle
This commit is contained in:
parent
80f53fd8be
commit
81c17abe19
|
@ -100,17 +100,20 @@ export class SMTPClient {
|
|||
}
|
||||
) {
|
||||
const [{ address: from = '' }] = addressparser(message.header.from);
|
||||
const stack: MessageStack = {
|
||||
message,
|
||||
to: [],
|
||||
from,
|
||||
callback: callback.bind(this),
|
||||
};
|
||||
|
||||
const {
|
||||
header: { to, cc, bcc, 'return-path': returnPath },
|
||||
} = message;
|
||||
|
||||
const stack: MessageStack = {
|
||||
message,
|
||||
to:
|
||||
(typeof to === 'string' || Array.isArray(to)) && to.length > 0
|
||||
? addressparser(to)
|
||||
: [],
|
||||
from,
|
||||
callback: callback.bind(this),
|
||||
};
|
||||
|
||||
if ((typeof to === 'string' || Array.isArray(to)) && to.length > 0) {
|
||||
stack.to = addressparser(to);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue