Skip to content

Commit 2be11ab

Browse files
committed
fix extend function
1 parent 8e7a9e7 commit 2be11ab

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/teams-js/src/internal/telemetry.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ registerLogger.formatArgs = function (args) {
1515

1616
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1717
const createDebuggerFunction = (namespace: string): Debugger => {
18-
let internalDebugger: Debugger = registerLogger(namespace);
18+
const internalDebugger: Debugger = registerLogger(namespace);
1919

2020
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2121
const func = function (formatter: any, ...args: any[]): void {
@@ -51,18 +51,12 @@ const createDebuggerFunction = (namespace: string): Debugger => {
5151
internalDebugger.namespace = namespace;
5252
},
5353
extend(namespace: string, delimiter?: string): Debugger {
54-
internalDebugger = internalDebugger.extend(namespace, delimiter);
55-
return this;
54+
return createDebuggerFunction(internalDebugger.extend(namespace, delimiter).namespace);
5655
},
5756
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5857
log(...args: any[]) {
5958
internalDebugger.log(args);
6059
},
61-
// destroy: {
62-
// value(): boolean {
63-
// return true;
64-
// },
65-
// },
6660
});
6761

6862
return func;

0 commit comments

Comments
 (0)