diff --git a/frontend/static/js/api/game/Game.js b/frontend/static/js/api/game/Game.js index 5e920a3..eb37606 100644 --- a/frontend/static/js/api/game/Game.js +++ b/frontend/static/js/api/game/Game.js @@ -52,7 +52,7 @@ class Game /** * @type {[Player]} */ - this.players = [] + this.players = []; response_data.players.forEach(player_data => { this.players.push(new Player(this, @@ -187,7 +187,7 @@ class Game async _receive_finish(data) { - await this.finish_handler(data) + await this.finish_handler(data); } async _receive_goal(data) @@ -200,10 +200,10 @@ class Game this.players.forEach(player => { if (data.player_id === player.id) { - player_found = player + player_found = player; return; } - }) + }); player_found.score.push(data.timestamp); @@ -221,7 +221,7 @@ class Game else if (data.detail === "goal") await this._receive_goal(data); else if (data.detail === "finish") - await this._receive_finish(data) + await this._receive_finish(data); } _init_game(data)