From 208d1246223557b0b87ef2b5520e735b98c5f394 Mon Sep 17 00:00:00 2001 From: tgpethan Date: Mon, 15 Jun 2020 13:34:43 +0100 Subject: [PATCH] Make sure reqhandler is not null / undefined --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 72a07a5..3c592ef 100644 --- a/index.js +++ b/index.js @@ -104,6 +104,10 @@ fs.readFile('./misc/ascii.txt', function(err, data) { } else { // All required modules are found, start the framework's server. global.modules.consoleHelper.printInfo(emoji.wave, "Starting Revolution..."); + if (reqhandler == null) { + global.modules.consoleHelper.printError(emoji.cross, "No request handler was loaded, possibly due to an error."); + process.exit(1); + } frameworkServer(); } }); -- 2.47.0