From f80c950e711d5f4a0299401b0f7f5effe27ea344 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 8 Nov 2022 22:11:40 +0200 Subject: [PATCH] Fix wrong type check --- src/MasterLogger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MasterLogger.js b/src/MasterLogger.js index d0de234..582e72c 100644 --- a/src/MasterLogger.js +++ b/src/MasterLogger.js @@ -24,7 +24,7 @@ class MasterLogger { for (const type of this.types) { Object.defineProperty(this, type, { // Only write debug outputs if debug mode is enabled - value: (msg) => type === 'debug' && debug || type !== 'debug' + value: (msg) => msg.type === 'debug' && debug || msg.type !== 'debug' ? this.write(type, msg) : null }); }