diff --git a/frontend/static/js/api/tournament/tournament.js b/frontend/static/js/api/tournament/tournament.js index 141ae57..c33da46 100644 --- a/frontend/static/js/api/tournament/tournament.js +++ b/frontend/static/js/api/tournament/tournament.js @@ -37,7 +37,7 @@ class Tourmanent let response = await this.client._get(`/api/tournaments/${id}`); if (response.status === 404) - return null; + return 1; let response_data = await response.json(); diff --git a/frontend/static/js/api/tournament/tournaments.js b/frontend/static/js/api/tournament/tournaments.js index 8424500..3383cd5 100644 --- a/frontend/static/js/api/tournament/tournaments.js +++ b/frontend/static/js/api/tournament/tournaments.js @@ -17,7 +17,8 @@ class Tourmanents async getTournament(id) { let tournament = new Tourmanent(this.client); - await tournament.init(id); + if (await tournament.init(id)) + return null; return tournament; }