diff --git a/src/client/JoinLobbyModal.ts b/src/client/JoinLobbyModal.ts index 20e0e79b0..59ee5b48a 100644 --- a/src/client/JoinLobbyModal.ts +++ b/src/client/JoinLobbyModal.ts @@ -55,6 +55,10 @@ export class JoinLobbyModal extends BaseModal { private countdownTimerId: number | null = null; private handledJoinTimeout = false; + private isPrivateLobby(): boolean { + return this.gameConfig?.gameType === GameType.Private; + } + private readonly handleLobbyInfo = (event: LobbyInfoEvent) => { const lobby = event.lobby; if (!this.currentLobbyId || lobby.gameID !== this.currentLobbyId) { @@ -91,6 +95,9 @@ export class JoinLobbyModal extends BaseModal { : translateText("public_lobby.started"); const maxPlayers = this.gameConfig?.maxPlayers ?? 0; const playerCount = this.playerCount; + const hostClientID = this.isPrivateLobby() + ? (this.lobbyCreatorClientID ?? "") + : ""; const content = html`