Skip to content

Commit

Permalink
Merge pull request #47 from jarett-lee/fast-remount-patch
Browse files Browse the repository at this point in the history
Fixed potential race condition
  • Loading branch information
nicolasgarnier authored Oct 4, 2018
2 parents 18b7090 + 98ba0e1 commit 0144c26
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 0144c26

Please sign in to comment.