diff --git a/backend/src/dal/user.ts b/backend/src/dal/user.ts index 4c5dab07b..2550d77c9 100644 --- a/backend/src/dal/user.ts +++ b/backend/src/dal/user.ts @@ -421,7 +421,7 @@ export async function checkIfTagPb( const ret: string[] = []; - tagsToCheck.forEach(async (tag) => { + for (const tag of tagsToCheck) { const tagPbs: MonkeyTypes.PersonalBests = tag.personalBests ?? { time: {}, words: {}, @@ -438,7 +438,7 @@ export async function checkIfTagPb( { $set: { "tags.$.personalBests": tagpb.personalBests } } ); } - }); + } return ret; }