summaryrefslogtreecommitdiff
path: root/scripts/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gui')
-rw-r--r--scripts/gui/lobby.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/gui/lobby.js b/scripts/gui/lobby.js
index c760f50..a303da8 100644
--- a/scripts/gui/lobby.js
+++ b/scripts/gui/lobby.js
@@ -193,8 +193,10 @@ class Lobby {
// { data.pass } true or false weather the game has a password
addGame (data) {
- let g = new Game(data, this.e.games);
- this.games[data.id] = g;
+ if(this.games[data.id] == null) {
+ let g = new Game(data, this.e.games);
+ this.games[data.id] = g;
+ }
}
// Called when a new public game is removed on the server