diff --git a/src/main.ts b/src/main.ts index 2737030d..438d516f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -80,7 +80,7 @@ function updateMap() { for (const player of players) { const buttonPressed = player.state.buttonPressed; // Workaround for Typescript type narrowing bug with "buttonPressed in buttons" - if (typeof buttonPressed === 'string' && (buttonPressed === "button1" || buttonPressed === "button2" || buttonPressed === "button3" || buttonPressed === "button4" || buttonPressed === "button5" || buttonPressed === "button6" || buttonPressed === "button7" || buttonPressed === "button8")) { + if (typeof buttonPressed === 'string' && (buttonPressed === "button1" || buttonPressed === "button2" || buttonPressed === "button3" || buttonPressed === "button4")) { buttons[buttonPressed].pressed = true; if (buttons[buttonPressed].color === 'red') { nbRedPressed++;