Skip to content

Commit 0144c26

Browse files
Merge pull request #47 from jarett-lee/fast-remount-patch
Fixed potential race condition
2 parents 18b7090 + 98ba0e1 commit 0144c26

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/FirebaseAuth.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ export default class FirebaseAuth extends React.Component {
8787
* @inheritDoc
8888
*/
8989
componentWillUnmount() {
90-
return firebaseUiDeletion.then(() => {
90+
firebaseUiDeletion = firebaseUiDeletion.then(() => {
9191
this.unregisterAuthObserver();
92-
firebaseUiDeletion = this.firebaseUiWidget.delete();
92+
return this.firebaseUiWidget.delete();
9393
});
94+
return firebaseUiDeletion;
9495
}
9596

9697
/**

0 commit comments

Comments
 (0)