diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-08-23 23:25:33 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-08-23 23:25:33 -0400 |
commit | e5ecd03e04afa3fdbdd1dfa275a2fd0368183545 (patch) | |
tree | bbda2ca5d6c9abe594867f4283496fb7ddd90998 | |
parent | 43333e401a22fc19a7cf0c87c180b37989a7b1a5 (diff) |
Remove deleted games from ui
-rw-r--r-- | scripts/gui/lobby.js | 6 |
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 |