From e2f2b0c713d04d4059162f2d4bb4b9e6afbd8150 Mon Sep 17 00:00:00 2001 From: Meleeman01 Date: Sat, 8 Mar 2025 20:25:30 -0600 Subject: [PATCH] sorry this commit actually fixes teh typeError bug --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 7fa6977..2612ca1 100644 --- a/server.js +++ b/server.js @@ -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