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
|
socket. This will also function as the main game joining for hibernated
|
||||||
games that were reloaded from disk.
|
games that were reloaded from disk.
|
||||||
*/
|
*/
|
||||||
let sameName = game.players.find(x => x.name == data.name);
|
let sameName = game.players.find(x => x.name === data.name);
|
||||||
if (sameName != null) {
|
if (sameName) {
|
||||||
|
|
||||||
if (!sameName.socket?.connected) {
|
if (!sameName.socket?.connected) {
|
||||||
sameName.socket = socket;
|
sameName.socket = socket;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue