We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14913c7 commit c92f959Copy full SHA for c92f959
1 file changed
src/Logger.ts
@@ -7,7 +7,10 @@ declare global {
7
var __ONE_LOGGER_INSTANCES__: Map<string, ILogger>;
8
}
9
10
-globalThis.__ONE_LOGGER_INSTANCES__ = new Map<string, ILogger>();
+// make sure we have a global logger instances map
11
+if (!globalThis.__ONE_LOGGER_INSTANCES__) {
12
+ globalThis.__ONE_LOGGER_INSTANCES__ = new Map<string, ILogger>();
13
+}
14
15
export interface LoggerOptions {
16
loggerName: string;
0 commit comments