Change to a strict type check
This commit is contained in:
parent
2a7d51dae9
commit
78d1d979de
1 changed files with 2 additions and 2 deletions
|
|
@ -94,8 +94,8 @@ export default (io: Server, socket: Socket, data: JoinGame) => {
|
|||
socket. This will also function as the main game joining for hibernated
|
||||
games that were reloaded from disk.
|
||||
*/
|
||||
let sameName = game.players.find(x => x.name == data.name);
|
||||
if (sameName != null) {
|
||||
let sameName = game.players.find(x => x.name === data.name);
|
||||
if (sameName) {
|
||||
|
||||
if (!sameName.socket?.connected) {
|
||||
sameName.socket = socket;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue