mirror of
https://github.com/strapi/strapi.git
synced 2025-10-18 03:23:49 +00:00
Remove last else condition
This commit is contained in:
parent
64d3149876
commit
01bb4cd0e2
@ -60,10 +60,11 @@ exports.connect = (provider, query) => {
|
||||
|
||||
// We need at least the mail.
|
||||
if (!profile.email) {
|
||||
reject([{
|
||||
return reject([{
|
||||
message: 'Email was not available.'
|
||||
}, null]);
|
||||
} else {
|
||||
}
|
||||
|
||||
try {
|
||||
const user = await strapi.query('user', 'users-permissions').findOne({email: profile.email});
|
||||
|
||||
@ -89,12 +90,10 @@ exports.connect = (provider, query) => {
|
||||
|
||||
return resolve([createdUser, null]);
|
||||
}
|
||||
|
||||
resolve([user, null]);
|
||||
} catch (err) {
|
||||
reject([null, err]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user