File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -224,8 +224,9 @@ Finds a user previously created with [`createUser`](https://www.firebase.com/doc
224224##### ` updateUser(user) ` -> ` Promise<Object> `
225225
226226Replace the existing user with a new one, by matching uid. Throws an
227- error If no user exists whose uid matches the given user's uid. Returns
228- the updated user.
227+ error If no user exists whose uid matches the given user's uid. Resolves
228+ with the updated user when complete. This operation is queued until the
229+ next flush.
229230
230231## Server Timestamps
231232
Original file line number Diff line number Diff line change @@ -95,10 +95,10 @@ FirebaseAuth.prototype.updateUser = function (newUser) {
9595 this . _defer ( 'updateUser' , _ . toArray ( arguments ) , ( ) => {
9696 const i = _ . findIndex ( self . _auth . users , u => u . uid === newUser . uid ) ;
9797 if ( i === - 1 ) {
98- return reject ( new Error ( 'Tried to update a nonexistent user' ) ) ;
98+ reject ( new Error ( 'Tried to update a nonexistent user' ) ) ;
9999 } else {
100100 self . _auth . users [ i ] = newUser . clone ( ) ;
101- return resolve ( newUser ) ;
101+ resolve ( newUser ) ;
102102 }
103103 } ) ;
104104 } ) ;
You can’t perform that action at this time.
0 commit comments