fix: wrap development errors in auth changes
This commit is contained in:
@@ -21,6 +21,7 @@ const withAuthentication = Component => {
|
||||
this.listener = this.props.firebase.auth.onAuthStateChanged(
|
||||
authUser => {
|
||||
localStorage.setItem("authUser", JSON.stringify(authUser))
|
||||
if (authUser) {
|
||||
this.setState({
|
||||
authUser: {
|
||||
uid: authUser.uid,
|
||||
@@ -28,6 +29,7 @@ const withAuthentication = Component => {
|
||||
emailVerified: authUser.emailVerified,
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
() => {
|
||||
localStorage.removeItem("authUser")
|
||||
|
||||
Reference in New Issue
Block a user