Skip to content

Commit

Permalink
prevent infinite loop on update
Browse files Browse the repository at this point in the history
  • Loading branch information
aoelen committed Aug 7, 2020
1 parent ff35aa2 commit 53981fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/Login/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ class LoginModal extends React.Component {
else if (this.props.userid && $('.ui.login.modal').modal('is active')) {
if (localStorage.getItem(MODI) === 'login')
localStorage.setItem(MODI, 'login_success');
this.setState({ isLoading: false });
if (this.state.loading) {
this.setState({ isLoading: false });
}
$('.ui.login.modal').modal('hide');

//redirect if on a specific page
Expand Down

0 comments on commit 53981fe

Please sign in to comment.