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;