mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #15405 from overleaf/msm-remove-redundant-check
[web] Remove redundant check GitOrigin-RevId: 035adf436c0d694fcb7817cd27e743683eb1252d
This commit is contained in:
parent
ce2222dcf7
commit
93b7e65f6c
1 changed files with 1 additions and 3 deletions
|
@ -157,9 +157,7 @@ async function _addInstitutionEmail(userId, email, providerId, auditLog) {
|
|||
throw new Errors.NotFoundError('user not found')
|
||||
}
|
||||
const emailAlreadyAssociated = user.emails.find(e => e.email === email)
|
||||
if (emailAlreadyAssociated && emailAlreadyAssociated.confirmedAt) {
|
||||
await UserUpdater.promises.updateUser(query, update)
|
||||
} else if (emailAlreadyAssociated) {
|
||||
if (emailAlreadyAssociated) {
|
||||
await UserUpdater.promises.updateUser(query, update)
|
||||
} else {
|
||||
await UserUpdater.promises.addEmailAddress(
|
||||
|
|
Loading…
Reference in a new issue