fix 404 crashes
This commit is contained in:
parent
4a80ab8bca
commit
04c11c5bde
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue