@@ -189,21 +189,21 @@ export default function InviteEmail() {
189189
190190 //TODO want to do this on-input, but that gets weird. see #188
191191 let errorCount = 0;
192− const mailsVerified = inputs.map(async input => {
193− console.log('aaa', invites);
194− const email = input.data;
195− const hasReceived = getHasReceived(email).matchWith({
196− Nothing: () => false, // loading
197− Just: p => p.value,
198− });
199− if (hasReceived) {
200− errorCount++;
201− addError({
202− [input.name]: `${email} has already received an invite.`,
192+ await Promise.all(
193+ inputs.map(async input => {
194+ const email = input.data;
195+ const hasReceived = getHasReceived(email).matchWith({
196+ Nothing: () => false, // loading
197+ Just: p => p.value,
203198 });
204− }
205− });
206− await Promise.all(mailsVerified);
199+ if (hasReceived) {
200+ errorCount++;
201+ addError({
202+ [input.name]: `${email} has already received an invite.`,
203+ });
204+ }
205+ })
206+ );
207207 if (errorCount > 0) {
208208 throw new Error(`Some of these already have a point!`);
209209 }