Skip to content

Commit

Permalink
Script upload
Browse files Browse the repository at this point in the history
  • Loading branch information
gericfo authored Sep 20, 2023
1 parent 0f91f5a commit c488d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit c488d1e

Please sign in to comment.