From 2551eb48379ce484bea4a7b468b1e117214f7416 Mon Sep 17 00:00:00 2001 From: Justin Halter Date: Thu, 26 Oct 2023 12:25:51 -0500 Subject: [PATCH] fix(reactmultiemail.tsx): trim emails with space after comma trim emails with space after comma. If you copy something like: email1@domain.com, email2@domain.com, email3@domain.com the space is --- react-multi-email/ReactMultiEmail.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-multi-email/ReactMultiEmail.tsx b/react-multi-email/ReactMultiEmail.tsx index 545ee11..9c1214f 100644 --- a/react-multi-email/ReactMultiEmail.tsx +++ b/react-multi-email/ReactMultiEmail.tsx @@ -106,7 +106,7 @@ export function ReactMultiEmail(props: IReactMultiEmailProps) { if (typeof validateResult === 'boolean') { if (validateResult) { - addEmails('' + arr.shift()); + addEmails('' + arr.shift()?.trim()); } else { if (allowDisplayName) { const validateResultWithDisplayName = isEmail('' + arr[0].trim(), { allowDisplayName });