From 0fc44971a1dffc179a9d1fb4bb43b5ca18c97244 Mon Sep 17 00:00:00 2001 From: ashley Date: Fri, 31 May 2024 11:42:39 +0000 Subject: [PATCH] check if param exists --- src/libpoketube/init/pages-static.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpoketube/init/pages-static.js b/src/libpoketube/init/pages-static.js index 9da952a0..76ea6a66 100644 --- a/src/libpoketube/init/pages-static.js +++ b/src/libpoketube/init/pages-static.js @@ -214,7 +214,7 @@ app.get("/game-hub", function (req, res) { var gameslist = ["pong", "tic-tac-toe", "sudoku", "snake"]; var requestedGame = req.query.game; - if (!gameslist.includes(requestedGame)) { + if (req.query.game && !gameslist.includes(requestedGame)) { return renderTemplate(res, req, "404.ejs"); }