From 276d8d4a42c4532fc6fcecb6dbe5b4b4f219a18f Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 17 Nov 2021 12:39:57 +0100 Subject: [PATCH] check for undefined, no need for ! --- src/logging/BaseLogger.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logging/BaseLogger.ts b/src/logging/BaseLogger.ts index 6ff50b98..2f7389ab 100644 --- a/src/logging/BaseLogger.ts +++ b/src/logging/BaseLogger.ts @@ -61,11 +61,11 @@ export abstract class BaseLogger implements ILogger { Errors and duration are transparently logged, also for async operations. Whatever the callback returns is returned here. */ run(labelOrValues: LabelOrValues, callback: LogCallback, logLevel?: LogLevel, filterCreator?: FilterCreator): T { - if (!logLevel) { + if (logLevel === undefined) { logLevel = LogLevel.Info; } const item = new LogItem(labelOrValues, logLevel, this); - return this._run(item, callback, logLevel!, true, filterCreator); + return this._run(item, callback, logLevel, true, filterCreator); } _run(item: ILogItem, callback: LogCallback, logLevel: LogLevel, wantResult: true, filterCreator?: FilterCreator): T;