Skip to content

Commit

Permalink
Fixed potential race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jarett-lee committed Sep 30, 2018
1 parent a9d71ba commit 98ba0e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/FirebaseAuth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ export default class FirebaseAuth extends React.Component {
* @inheritDoc
*/
componentWillUnmount() {
return firebaseUiDeletion.then(() => {
firebaseUiDeletion = firebaseUiDeletion.then(() => {
this.unregisterAuthObserver();
firebaseUiDeletion = this.firebaseUiWidget.delete();
return this.firebaseUiWidget.delete();
});
return firebaseUiDeletion;
}

/**
Expand Down

0 comments on commit 98ba0e1

Please sign in to comment.