diff --git a/index.js b/index.js index 938daa1..f34f9e2 100644 --- a/index.js +++ b/index.js @@ -546,6 +546,9 @@ io.on('connection', async (socket) => { } socket.on('ready', async (callback) => { + if (!(callback && typeof callback === 'function')) { + return; + } const playerGame = await GInfo.getPlayerGameData(socket); let timeLeft = await GInfo.timerLeft(playerGame.id);