ConsoleLoggerService: Fix type of context properties

Nullish values of functionContext and classContext are handled correctly,
so the type can be adjusted

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-04-29 16:10:46 +02:00
parent d9799717b5
commit 99103ad217
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -14,7 +14,7 @@ import { needToLog } from '../config/utils';
@Injectable({ scope: Scope.TRANSIENT })
export class ConsoleLoggerService {
private classContext: string;
private classContext: string | undefined;
private lastTimestamp: number;
constructor(
@ -83,7 +83,7 @@ export class ConsoleLoggerService {
}
}
private makeContextString(functionContext: string): string {
private makeContextString(functionContext?: string): string {
let context = this.classContext;
if (!context) {
context = 'HedgeDoc';