Skip to content

Commit

Permalink
Merge pull request #1276 from slidewiki/fix-infinite-loop
Browse files Browse the repository at this point in the history
prevent infinite loop on update
  • Loading branch information
rezatavakoli authored Aug 21, 2020
2 parents 646211f + f85b240 commit 50f80c4
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 50f80c4

Please sign in to comment.