From ed00780897b187bcf4bcc98438fdefe331d02359 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Mon, 7 Oct 2024 17:31:24 -0400 Subject: [PATCH] fix: Chain issues --- lib/log.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/log.js b/lib/log.js index 1bac027..3efb778 100644 --- a/lib/log.js +++ b/lib/log.js @@ -97,7 +97,7 @@ class Logger { } isVisible (level) { - return (this.level && this.level.index <= (this.#levels.get(level) && this.#levels.get(level).index)) || -1 + return (this.level && this.level.index <= (this.#levels.get(level) && this.#levels.get(level).index) || -1) } _onLog (...args) { @@ -136,7 +136,7 @@ class Logger { } _log (levelId, msgPrefix, ...args) { - if (!this.isVisible(levelId) || (this.#stream && typeof this.#stream.write !== 'function')) { + if (!this.isVisible(levelId) || (!this.#stream || typeof this.#stream.write !== 'function')) { return }