From 6ca86168b13ec295012a069c4d1490e50f6e700a Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 8 Feb 2023 15:36:30 +0100 Subject: [PATCH] Merge pull request #11741 from overleaf/tm-fix-foreach-invite-email-lowercase-script Bugfix for script to fix lowercase emails in group invites GitOrigin-RevId: f8581376fa5dde2fe057f0e988e5921de7446612 --- services/web/scripts/fix_group_invite_emails_to_lowercase.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/scripts/fix_group_invite_emails_to_lowercase.js b/services/web/scripts/fix_group_invite_emails_to_lowercase.js index 6e37753a45..69cd273160 100644 --- a/services/web/scripts/fix_group_invite_emails_to_lowercase.js +++ b/services/web/scripts/fix_group_invite_emails_to_lowercase.js @@ -14,7 +14,7 @@ function anyInviteEmailHasUppercaseChars(subscription) { } async function processBatch(_, subscriptions) { - subscriptions.forEach(subscription => { + for (const subscription of subscriptions) { if (anyInviteEmailHasUppercaseChars(subscription)) { console.log('fixing emails in group invites for', subscription._id) if (!DRY_RUN) { @@ -41,7 +41,7 @@ async function processBatch(_, subscriptions) { ]) } } - }) + } } async function main() {