Improve error message for Bo3 crash

This commit is contained in:
Guangcong Luo 2023-11-05 22:00:04 -05:00
parent 603e3cd82f
commit 13c8c19064

View File

@ -1576,6 +1576,7 @@ export class BestOfGame extends RoomGames.RoomGame {
player.sendRoom(prompt);
player.sendRoom(button);
// send it to the main room as well, in case they x out of the old one
if (!this.playerTable[userid]) throw new Error(`Player ${userid} in ${this.roomid} doesn't exist`);
this.playerTable[userid].sendRoom(prompt);
this.playerTable[userid].sendRoom(button);
}