From 86060d7c5be05c6b022d6dafd1495ae159fca478 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 5 Sep 2022 22:23:43 -0700 Subject: [PATCH] Reversed #4508 since the code aleady does this. --- meshcentral.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/meshcentral.js b/meshcentral.js index 916ed515..25624fbd 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -796,13 +796,9 @@ function CreateMeshCentralServer(config, args) { } // Local console tracing - var debugOptions = [obj.args.debug]; - if (config.settings.debug) { debugOptions.push(config.settings.debug) } - debugOptions.forEach((option) => { - if (typeof option == 'string') { obj.debugSources = option.toLowerCase().split(','); } - else if (typeof option == 'object') { obj.debugSources = option; } - else if (option === true) { obj.debugSources = '*'; } - }); + if (typeof obj.args.debug == 'string') { obj.debugSources = obj.args.debug.toLowerCase().split(','); } + else if (typeof obj.args.debug == 'object') { obj.debugSources = obj.args.debug; } + else if (obj.args.debug === true) { obj.debugSources = '*'; } require('./db.js').CreateDB(obj, function (db) {