From 04c11c5bdee4e896d65d0a0b259727c4c12ecda9 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Mon, 25 Nov 2024 14:12:44 -0500 Subject: [PATCH] fix 404 crashes --- routes.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/routes.js b/routes.js index f900406..21aefe4 100644 --- a/routes.js +++ b/routes.js @@ -55,15 +55,13 @@ async function iterate(req, res, index) { let cmd = req.params.route; if (keys.indexOf(cmd) == -1) { - routesI['e404'].run(req, res, {}); - return; + return await routes.client['e404'].run(req, res, {}); } - let dat = await routesI[cmd].run(req, res, {}); + let dat = await routesI[cmd].run(req, res, {}); if (!dat) { - routesI['e404'].run(req, res, {}); - return; + return await routes.client['e404'].run(req, res, {}); } return dat;