sorry this commit actually fixes teh typeError bug
This commit is contained in:
parent
08d10bc672
commit
e2f2b0c713
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user