From d19436d04494724777adfd829078b0ac66c1781e Mon Sep 17 00:00:00 2001 From: muxator Date: Wed, 29 Aug 2018 01:34:45 +0200 Subject: [PATCH] adminsettings: early return, no functional changes. --- src/node/hooks/express/adminsettings.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/node/hooks/express/adminsettings.js b/src/node/hooks/express/adminsettings.js index 73691837a..baa0bb70a 100644 --- a/src/node/hooks/express/adminsettings.js +++ b/src/node/hooks/express/adminsettings.js @@ -28,15 +28,13 @@ exports.socketio = function (hook_name, args, cb) { if (err) { return console.log(err); } - else - { - //if showSettingsInAdminPage is set to false, then return NOT_ALLOWED in the result - if(settings.showSettingsInAdminPage === false) { - socket.emit("settings", {results:'NOT_ALLOWED'}); - } - else { - socket.emit("settings", {results: data}); - } + + //if showSettingsInAdminPage is set to false, then return NOT_ALLOWED in the result + if(settings.showSettingsInAdminPage === false) { + socket.emit("settings", {results:'NOT_ALLOWED'}); + } + else { + socket.emit("settings", {results: data}); } }); });