vck3000 / ProAvalon

Online platform for The Resistance!
https://www.ProAvalon.com
MIT License
89 stars 73 forks source link

Fix game creation request on initial load #672

Closed vck3000 closed 6 months ago

vck3000 commented 6 months ago
Uncaught exception: Error: Invalid gameMode string. Got null
    at strToGameMode (/app/out/gameplay/gameModes.js:19:19)
    at isGameMode (/app/out/gameplay/gameModes.js:26:44)
    at Socket.newRoom (/app/out/sockets/sockets.js:1461:41)
    at Socket.emit (node:events:517:28)
    at Socket.emitUntyped (/app/node_modules/socket.io/dist/typed-events.js:69:22)
    at /app/node_modules/socket.io/dist/socket.js:704:39
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Bug comes from when user attempts to create a new room right after loading the lobby page, but before the server has had a chance to send out the game modes to them.

kev306 commented 6 months ago

closed in https://github.com/vck3000/ProAvalon/pull/676