fix: Chain issues

This commit is contained in:
Felix Rieseberg 2024-10-07 17:31:24 -04:00
parent 27eb048ae4
commit ed00780897

View file

@ -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
}