diff --git a/server/socket-handlers/general-socket-handler.js b/server/socket-handlers/general-socket-handler.js index 11b47a5bf..bb4a38086 100644 --- a/server/socket-handlers/general-socket-handler.js +++ b/server/socket-handlers/general-socket-handler.js @@ -9,10 +9,10 @@ let gameList = null; /** * Get a game list via GameDig - * @returns {any[]} + * @returns {Object[]} list of games supported by GameDig */ function getGameList() { - if (!gameList) { + if (gameList == null) { gameList = gameResolver._readGames().games.sort((a, b) => { if ( a.pretty < b.pretty ) { return -1; @@ -22,9 +22,8 @@ function getGameList() { } return 0; }); - } else { - return gameList; } + return gameList; } module.exports.generalSocketHandler = (socket, server) => {