From bda3d36900930c20eb30c517d8834e0eebc1b4c3 Mon Sep 17 00:00:00 2001 From: Brawn Date: Sun, 22 Dec 2024 16:12:19 +0300 Subject: [PATCH] fix: Simplified level assignment logic in BrowserConsole --- packages/logger/src/browser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/logger/src/browser.ts b/packages/logger/src/browser.ts index 60e756079377..55d44c632045 100644 --- a/packages/logger/src/browser.ts +++ b/packages/logger/src/browser.ts @@ -57,7 +57,7 @@ class BrowserConsole extends Transport { constructor(opts: winston.transport.TransportStreamOptions | undefined) { super(opts); - this.level = opts?.level && Object.prototype.hasOwnProperty.call(this.levels, opts.level) ? opts.level : "info"; + this.level = opts?.level ?? "info"; } log(info: WinstonLogInfo, callback: () => void): void {