Skip to content
Snippets Groups Projects
Commit b2456fa9 authored by Anton Georgiev's avatar Anton Georgiev
Browse files

prevent looping on fetchToken()

parent 636c705d
No related branches found
No related tags found
No related merge requests found
......@@ -33,14 +33,21 @@ class JoinHandler extends Component {
}
componentDidMount() {
this._isMounted = true;
this.fetchToken();
}
componentWillUnmount() {
this._isMounted = false;
}
changeToJoin(bool) {
this.setState({ joined: bool });
}
async fetchToken() {
if (!this._isMounted) return;
if (!Meteor.status().connected) {
if (this.numFetchTokenRetries > 9) {
logger.error({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment