Merge pull request #10 from electron/felixr-fix-chain-issues

fix: Chain issues
This commit is contained in:
Felix Rieseberg 2024-10-07 14:31:45 -07:00 committed by GitHub
commit 6424f61832
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,7 @@ class Logger {
} }
isVisible (level) { 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) { _onLog (...args) {
@ -136,7 +136,7 @@ class Logger {
} }
_log (levelId, msgPrefix, ...args) { _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 return
} }