aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-04-19 12:11:16 -0400
committerbobzel <zzzman@gmail.com>2024-04-19 12:11:16 -0400
commitec859c33f69d586f287aecdceeca38c4e77cb0ab (patch)
treed8f5e0e3165c5d2ae54104597972b5955d8e295a /src/Utils.ts
parent89e5b4e224d77c7a029ec7d9c9027095665508ac (diff)
lint errors
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Utils.ts b/src/Utils.ts
index 0455fd19a..c87ef052c 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -43,15 +43,15 @@ export namespace Utils {
export function TraceConsoleLog() {
['log', 'warn'].forEach(method => {
const old = (console as any)[method];
- (console as any)[method] = function () {
+ (console as any)[method] = function (...args: any[]) {
let stack = new Error('').stack?.split(/\n/);
// Chrome includes a single "Error" line, FF doesn't.
if (stack && stack[0].indexOf('Error') === 0) {
stack = stack.slice(1);
}
const message = (stack?.[1] || 'Stack undefined!').trim();
- const args = ([] as any[]).slice.apply(arguments).concat([message]);
- return old.apply(console, args);
+ const newArgs = args.slice().concat([message]);
+ return old.apply(console, newArgs);
};
});
}