diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 745d4ef584e..eb34cd59380 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -55,7 +55,7 @@ function exportLoggerFunctions( export function enableLogs(debugConfig: boolean | ILogger, id: string): void { // check that console is available if ( - (self.console && debugConfig === true) || + (typeof console === 'object' && debugConfig === true) || typeof debugConfig === 'object' ) { exportLoggerFunctions(