diff --git a/src/libpoketube/init/pages-channel-and-download.js b/src/libpoketube/init/pages-channel-and-download.js index 19be20dd..2f91a2cf 100644 --- a/src/libpoketube/init/pages-channel-and-download.js +++ b/src/libpoketube/init/pages-channel-and-download.js @@ -88,7 +88,7 @@ module.exports = function (app, config, renderTemplate) { }); app.get("/search", async (req, res) => { - const query = req.query.query.replace("ohio", "things to do in ohio"); + const query = req.query.query ? req.query.query.replace("ohio", "things to do in ohio") : ''; const tab = req.query.tab; const { fetch } = await import("undici");