mirror of https://github.com/eleith/emailjs.git
smtp/address: convert address to array when tokenizing
This commit is contained in:
parent
207de70fa9
commit
f9db729f6e
|
@ -39,7 +39,7 @@ function tokenizeAddress(address: string | string[] = '') {
|
|||
let token: AddressToken | undefined = undefined;
|
||||
let operator: string | undefined = undefined;
|
||||
|
||||
for (const character of address.toString()) {
|
||||
for (const character of address.toString().split('')) {
|
||||
if ((operator?.length ?? 0) > 0 && character === operator) {
|
||||
tokens.push({ type: 'operator', value: character });
|
||||
token = undefined;
|
||||
|
|
Loading…
Reference in New Issue