summaryrefslogtreecommitdiff
path: root/scripts/gui/lobby.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gui/lobby.js')
-rw-r--r--scripts/gui/lobby.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/gui/lobby.js b/scripts/gui/lobby.js
index f790a31..3a1689b 100644
--- a/scripts/gui/lobby.js
+++ b/scripts/gui/lobby.js
@@ -206,7 +206,13 @@ class Lobby {
// Called when a new public game is removed on the server
// { data string } the uuid of the game to delete
deleteGame (data) {
+ if(this.games[data] == null)
+ return;
+
+ this.games[data].remove();
delete this.games[data];
+ this.gameCt--;
+ this.e.stats.pubgame.innerText = this.gameCt;
}
// Called when the client wants to toggle the new game screen