Skip to content

Commit

Permalink
Fixed bug from calling $logout multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobawenger committed Oct 10, 2014
1 parent 9eeaa5c commit 2174847
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/firebaseSimpleLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@

// Unauthenticate the Firebase reference.
logout: function() {
// Tell the simple login client to log us out.
this._authClient.logout();
if (this._currentUserData) {
// Tell the simple login client to log us out.
this._authClient.logout();

// Forget who we were, so that any getCurrentUser calls will wait for
// another user event.
delete this._currentUserData;
// Forget who we were, so that any getCurrentUser calls will wait for
// another user event.
delete this._currentUserData;
}
},

// Creates a user for Firebase Simple Login. Function 'cb' receives an
Expand Down Expand Up @@ -231,4 +233,4 @@
}
}
};
})();
})();

0 comments on commit 2174847

Please sign in to comment.