Skip to content

Commit 90f35ab

Browse files
committed
Remove a few warnings from auth
1 parent b0e670d commit 90f35ab

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/firebase-auth.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Object.keys(signinMethods)
180180
FirebaseAuth.prototype[method] = function () {
181181
var self = this;
182182
var user = getUser.apply(this, arguments);
183-
var promise = new Promise(function(resolve, reject) {
183+
return new Promise(function(resolve, reject) {
184184
self._authEvent(method, function(err) {
185185
if (err) reject(err);
186186
self.currentUser = user;
@@ -276,7 +276,7 @@ FirebaseAuth.prototype.unauth = function () {
276276

277277
FirebaseAuth.prototype.signOut = function () {
278278
var self = this, updateuser = this.currentUser !== null;
279-
var promise = new Promise(function(resolve, reject) {
279+
return new Promise(function(resolve, reject) {
280280
self._authEvent('signOut', function(err) {
281281
if (err) reject(err);
282282
self.currentUser = null;
@@ -287,7 +287,6 @@ FirebaseAuth.prototype.signOut = function () {
287287
}
288288
}, true);
289289
});
290-
return promise;
291290
};
292291

293292
FirebaseAuth.prototype.createUserWithEmailAndPassword = function (email, password) {
@@ -569,7 +568,7 @@ FirebaseAuth.prototype._nextUid = function () {
569568
FirebaseAuth.prototype._validateNewUid = function (uid) {
570569
if (uid) {
571570
var user = _.find(this._auth.users, function(user) {
572-
return user.uid == uid;
571+
return user.uid === uid;
573572
});
574573
if (user) {
575574
var err = new Error('The provided uid is already in use by an existing user. Each user must have a unique uid.');
@@ -583,7 +582,7 @@ FirebaseAuth.prototype._validateNewUid = function (uid) {
583582
FirebaseAuth.prototype._validateExistingUid = function (uid) {
584583
if (uid) {
585584
var user = _.find(this._auth.users, function(user) {
586-
return user.uid == uid;
585+
return user.uid === uid;
587586
});
588587
if (!user) {
589588
var err = new Error('There is no existing user record corresponding to the provided identifier.');

test/unit/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ describe('Auth', function () {
10061006
return ref.createUser({
10071007
10081008
password: 'kato'
1009-
}).then(function(user) {
1009+
}).then(function() {
10101010
var err = new Error('custom error');
10111011
ref.failNext('setCustomUserClaims', err);
10121012
return expect(ref.setCustomUserClaims('uid', {

0 commit comments

Comments
 (0)