mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-31 00:36:16 +00:00
Fix: getGameList returns nothing on first run
This commit is contained in:
parent
6235ce6b29
commit
7b8ed01f27
1 changed files with 2 additions and 3 deletions
|
@ -12,7 +12,7 @@ let gameList = null;
|
||||||
* @returns {any[]}
|
* @returns {any[]}
|
||||||
*/
|
*/
|
||||||
function getGameList() {
|
function getGameList() {
|
||||||
if (!gameList) {
|
if (gameList == null) {
|
||||||
gameList = gameResolver._readGames().games.sort((a, b) => {
|
gameList = gameResolver._readGames().games.sort((a, b) => {
|
||||||
if ( a.pretty < b.pretty ) {
|
if ( a.pretty < b.pretty ) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -22,9 +22,8 @@ function getGameList() {
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
return gameList;
|
|
||||||
}
|
}
|
||||||
|
return gameList;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.generalSocketHandler = (socket, server) => {
|
module.exports.generalSocketHandler = (socket, server) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue