remove log when joining nonexistent lobby
This commit is contained in:
@@ -7,10 +7,7 @@ import { io } from "../server.js";
|
|||||||
|
|
||||||
export async function joinLobby(this: Socket, gameCode: string) {
|
export async function joinLobby(this: Socket, gameCode: string) {
|
||||||
const game = activeGames.find((g) => g.code === gameCode);
|
const game = activeGames.find((g) => g.code === gameCode);
|
||||||
if (!game) {
|
if (!game) return;
|
||||||
console.log(`joinLobby: Game code ${gameCode} not found.`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (game.host && game.host?.id === this.request.session.user.id) {
|
if (game.host && game.host?.id === this.request.session.user.id) {
|
||||||
game.host.connected = true;
|
game.host.connected = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user