Skip to content

Commit 686d80f

Browse files
committed
fix localstorage for build
1 parent 6e4d411 commit 686d80f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/Session/withAuthentication.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const withAuthentication = Component => {
1111
super(props);
1212

1313
this.state = {
14-
authUser: JSON.parse(localStorage.getItem('authUser')),
14+
authUser: null,
1515
};
1616
}
1717

@@ -36,6 +36,10 @@ const withAuthentication = Component => {
3636
};
3737

3838
componentDidMount() {
39+
this.setState({
40+
authUser: JSON.parse(localStorage.getItem('authUser')),
41+
});
42+
3943
this.firebaseInit();
4044
}
4145

0 commit comments

Comments
 (0)