mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-19 16:51:40 +01:00
Use undefined instead of null
This commit is contained in:
parent
eb7c5c4437
commit
9fed2ca41b
@ -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…
x
Reference in New Issue
Block a user