Fix player addition logic in match handling

Prevent adding a player to matchPlayers if userIndex is not found.
This commit is contained in:
Luna 2025-11-22 22:39:55 +01:00 committed by GitHub
parent a0c3d54713
commit d9f77887f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -821,7 +821,7 @@
...matchPlayers.slice(userIndex + 1) ...matchPlayers.slice(userIndex + 1)
]; ];
} else { } else {
matchPlayers = [...matchPlayers, params[0]]; return;
} }
} }
@ -1717,4 +1717,4 @@
gap: 0.75rem; gap: 0.75rem;
} }
} }
</style> </style>