diff --git a/src/logging/LogFilter.ts b/src/logging/LogFilter.ts index 476bca0e..4da7d457 100644 --- a/src/logging/LogFilter.ts +++ b/src/logging/LogFilter.ts @@ -30,7 +30,7 @@ export enum LogLevel { export type LogLevelOrNull = LogLevel | null; export class LogFilter { - private _min: LogLevelOrNull = null; + private _min?: LogLevel; private _parentFilter?: LogFilter; constructor(parentFilter?: LogFilter) { @@ -44,7 +44,7 @@ export class LogFilter { } } // neither our children or us have a loglevel high enough, filter out. - if (this._min !== null && !Array.isArray(children) && item.logLevel < this._min) { + if (this._min && !Array.isArray(children) && item.logLevel < this._min) { return false; } else { return true;