From 71b0e6ca43ad2e10f773da8826b38af0e93123e7 Mon Sep 17 00:00:00 2001 From: Juan Navarro Date: Wed, 27 Jul 2022 16:42:24 +0200 Subject: [PATCH] openvidu-browser: Node.js platform: ConsoleLogger constructor Doesn't look right that the argument is ignored and instead global state is modified. The code later passes in `window.console` anyway, so this doesn't really change the behavior. However this change is important for Node.js compatibility, where `window` is not defined. --- .../src/OpenViduInternal/Logger/ConsoleLogger.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openvidu-browser/src/OpenViduInternal/Logger/ConsoleLogger.ts b/openvidu-browser/src/OpenViduInternal/Logger/ConsoleLogger.ts index 4ee2503d..da103bdc 100644 --- a/openvidu-browser/src/OpenViduInternal/Logger/ConsoleLogger.ts +++ b/openvidu-browser/src/OpenViduInternal/Logger/ConsoleLogger.ts @@ -33,10 +33,10 @@ export class ConsoleLogger { constructor(console: Console) { this.logger = console; - this.log = window.console.log, - this.info = window.console.info, - this.debug = window.console.debug, - this.warn = window.console.warn, - this.error = window.console.error + this.log = console.log, + this.info = console.info, + this.debug = console.debug, + this.warn = console.warn, + this.error = console.error } -} \ No newline at end of file +}