sorry this commit actually fixes teh typeError bug

This commit is contained in:
Meleeman01 2025-03-08 20:25:30 -06:00
parent 08d10bc672
commit e2f2b0c713

View File

@ -579,7 +579,7 @@ wss.on('connection', (ws) => {
// Simulate a wheel spin result and update room state
let spinResult = getRandomValue(wheel)
if (spinResult != ['lose a turn', 'spin again', 'Bankrupt'].indexOf(spinResult)) {
if (typeof spinResult !== 'string') {
room.gameState.turnState = 'guess'
room.gameState.players = room.gameState.players.map((player) => {
return player.id === ws.identifierToken ? {...player, points:parseInt(player.points)+parseInt(spinResult)} : player