Skip to content

Commit 0230678

Browse files
committed
add explicit error for null hostToken
1 parent 647a0dc commit 0230678

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/client/HostLobbyModal.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ export class HostLobbyModal extends LitElement {
592592

593593
createLobby(this.lobbyCreatorClientID)
594594
.then((lobby) => {
595+
if (lobby.hostToken === null) {
596+
throw new Error("Server did not return hostToken for private lobby");
597+
}
595598
this.lobbyId = lobby.gameInfo.gameID;
596599
// join lobby
597600
const cookieDurationSec = 60 * 60 * 6; // store for max 6 hours

0 commit comments

Comments
 (0)