From ce289be439d1a9a874a8851f4fc064aea1bd7f0b Mon Sep 17 00:00:00 2001 From: I-Have-An-Issue <34550332+I-Have-An-Issue@users.noreply.github.com> Date: Mon, 23 Jan 2023 16:17:27 -0500 Subject: [PATCH] OK now its fixed --- src/routes/game/start.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/game/start.js b/src/routes/game/start.js index f47a63b..2bcc564 100644 --- a/src/routes/game/start.js +++ b/src/routes/game/start.js @@ -14,7 +14,7 @@ function getGameById(id) { } app.get("/:id", async (request, response) => { - const game = global.games.get(getGameById(request.params.id).id) + const game = global.games.get(getGameById(request.params.id)?.id) if (game) return response.status(400).json({ error: "Game is running" }) const job = new GameJob()