smtp/address: convert address to array when tokenizing

This commit is contained in:
Zack Schuster 2022-05-06 20:36:00 -07:00
parent 207de70fa9
commit f9db729f6e
1 changed files with 1 additions and 1 deletions

View File

@ -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;