fix error

This commit is contained in:
Phillip Thelen
2021-12-17 15:26:53 +01:00
parent 427e2f240a
commit 0eec30a270
+2 -2
View File
@@ -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;