mirror of https://github.com/eleith/emailjs.git
smtp/address: convert address to array when tokenizing
This commit is contained in:
parent
5c2bbb211c
commit
f385fe735c
|
@ -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