Skip to content

Commit e1a01be

Browse files
committed
Minor cleanup
1 parent a372cff commit e1a01be

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

API.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ Finds a user previously created with [`createUser`](https://www.firebase.com/doc
224224
##### `updateUser(user)` -> `Promise<Object>`
225225

226226
Replace 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

src/firebase-auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)