Skip to content

Commit

Permalink
Merge pull request #464 from dividehex/fix_link_user
Browse files Browse the repository at this point in the history
Remove spread operator as promises are not iterable
  • Loading branch information
dividehex authored Jun 3, 2024
2 parents 5c26bb1 + a592ec3 commit ae1fac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/link-users-by-email-with-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function linkUsersByEmailWithMetadata(user, context, callback) {
let fetchPromiseArray = [fetch(emailUrl.toString(), opts)];
// if this user is mixed case, we need to also search for the lower case equivalent
if (user.email !== user.email.toLowerCase()) {
fetchPromiseArray.push(...fetch(emailUrlToLower.toString(), opts));
fetchPromiseArray.push(fetch(emailUrlToLower.toString(), opts));
}
// Call one (or two) api calls to the /user-by-email api endpoint
const responsePromises = await Promise.all(fetchPromiseArray);
Expand Down

0 comments on commit ae1fac3

Please sign in to comment.