fix(UserCredentials): Move credential update to an else statement (#16663)
Fixes situations where a new credential is created Closes #16568
This commit is contained in:
committed by
mrugesh mohapatra
parent
99afe980dc
commit
8c01f4a08f
@ -63,17 +63,18 @@ module.exports = function(UserCredential) {
|
||||
created: modified,
|
||||
modified
|
||||
});
|
||||
}
|
||||
_credentials.credentials = credentials;
|
||||
updateCredentials = observeQuery(
|
||||
} else {
|
||||
_credentials.credentials = credentials;
|
||||
updateCredentials = observeQuery(
|
||||
_credentials,
|
||||
'updateAttributes',
|
||||
{
|
||||
profile: null,
|
||||
credentials,
|
||||
modified
|
||||
}
|
||||
);
|
||||
'updateAttributes',
|
||||
{
|
||||
profile: null,
|
||||
credentials,
|
||||
modified
|
||||
}
|
||||
);
|
||||
}
|
||||
return Observable.combineLatest(
|
||||
updateUser,
|
||||
updateCredentials,
|
||||
|
Reference in New Issue
Block a user