From a87408009d6321070e4776e1eeb55fe09b154b75 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Tue, 13 Apr 2021 23:21:55 +0200 Subject: [PATCH] Logging: Handle calls with 'undefined' context Signed-off-by: Philip Molares --- src/logger/console-logger.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/logger/console-logger.service.ts b/src/logger/console-logger.service.ts index 135018df6..cc8e6a392 100644 --- a/src/logger/console-logger.service.ts +++ b/src/logger/console-logger.service.ts @@ -85,6 +85,9 @@ export class ConsoleLoggerService { private makeContextString(functionContext: string): string { let context = this.classContext; + if (!context) { + context = 'HedgeDoc'; + } if (functionContext) { context += '.' + functionContext + '()'; }