Ensure player's socket object exists.
This commit is contained in:
parent
4d63e78d2c
commit
e5a14322c0
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ function activeGame(game: Game): boolean {
|
||||||
* stagnant and will be deleted by the cleanup code.
|
* stagnant and will be deleted by the cleanup code.
|
||||||
*/
|
*/
|
||||||
for (var player of game.players) {
|
for (var player of game.players) {
|
||||||
if (player.socket.connected) {
|
if (player.socket?.connected) {
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue