fix error
This commit is contained in:
@@ -157,9 +157,9 @@ async function registerLocal (req, res, { isV3 = false }) {
|
||||
};
|
||||
|
||||
if (existingUser) {
|
||||
let networks = common.constants.SUPPORTED_SOCIAL_NETWORKS;
|
||||
const networks = common.constants.SUPPORTED_SOCIAL_NETWORKS;
|
||||
// need to insert FB here to allow users who only have FB auth to connect local auth.
|
||||
networks.insert({ key: 'facebook', name: 'Facebook' })
|
||||
networks.push({ key: 'facebook', name: 'Facebook' });
|
||||
const hasSocialAuth = networks.find(network => {
|
||||
if (existingUser.auth.hasOwnProperty(network.key)) { // eslint-disable-line no-prototype-builtins, max-len
|
||||
return existingUser.auth[network.key].id;
|
||||
|
||||
Reference in New Issue
Block a user