Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleGetPlayerIdError = (error) => {
switch (error.code) {
case StatusCode.DEADLINE_EXCEEDED:
this.setState({
leaderboardOk: true,
notification: CONSTANTS.DEADLINE_NOTIFICATION
});
break;
default:
this.handleError(error);
}
this.getTopPlayerScoreCall();
if (this.statisticsTopPlayerScoreInterval) {
clearInterval(this.statisticsTopPlayerScoreInterval);
}
this.statisticsTopPlayerScoreInterval = setInterval(this.getTopPlayerScoreCall.bind(this), CONSTANTS.TOP_PLAYER_SCORE_INTERVAL);
}