fix 404 crashes

This commit is contained in:
biglyderv 2024-11-25 14:12:44 -05:00
parent 4a80ab8bca
commit 04c11c5bde

View file

@ -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;