diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/share-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/share-dialog/index.tsx index d0290cac..77d5efbc 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/share-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/share-dialog/index.tsx @@ -114,7 +114,11 @@ const ShareDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement }; // very basic email validation, just make sure the basic syntax is fine - const isValid = model.emails.split(',').every(str => /\S+@\S+\.\S+/.test((str || '').trim())); + const isValid = model.emails + .split(/,|;/) + .filter(e => e.trim().length > 0) + .every(str => /\S+@\S+\.\S+/.test((str || '') + .trim())); return (