forked from mystiq/hydrogen-web
Use undefined instead of null
This commit is contained in:
parent
eb7c5c4437
commit
9fed2ca41b
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue