This commit is contained in:
Scott Anderson
2025-05-13 02:13:27 -04:00
parent 781ddb5911
commit a38d3d986f
23 changed files with 39 additions and 42 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ export async function readGameRecord(
Key: `${gameFolder}/${gameId}`, // Fixed - needed to include gameFolder
});
// Parse the response body
if (typeof response.Body === "undefined") return null;
if (response.Body === undefined) return null;
const bodyContents = await response.Body.transformToString();
return JSON.parse(bodyContents) as GameRecord;
} catch (error) {
+4 -4
View File
@@ -235,7 +235,7 @@ async function fetchLobbies(): Promise<number> {
lobbyInfos.forEach((l) => {
if (
"msUntilStart" in l &&
typeof l.msUntilStart !== "undefined" &&
l.msUntilStart !== undefined &&
l.msUntilStart <= 250
) {
publicLobbyIDs.delete(l.gameID);
@@ -244,11 +244,11 @@ async function fetchLobbies(): Promise<number> {
if (
"gameConfig" in l &&
typeof l.gameConfig !== "undefined" &&
l.gameConfig !== undefined &&
"maxPlayers" in l.gameConfig &&
typeof l.gameConfig.maxPlayers !== "undefined" &&
l.gameConfig.maxPlayers !== undefined &&
"numClients" in l &&
typeof l.numClients !== "undefined" &&
l.numClients !== undefined &&
l.gameConfig.maxPlayers <= l.numClients
) {
publicLobbyIDs.delete(l.gameID);