File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,13 @@ const createConsoleCatcher = (): {
6363 const oldFunction = window . console [ method ] . bind ( window . console ) ;
6464
6565 window . console [ method ] = function ( ...args : unknown [ ] ) : void {
66- const stack =
67- new Error ( ) . stack ?. split ( '\n' ) . slice ( 2 ) . join ( '\n' ) || '' ;
66+ const stack = new Error ( ) . stack ?. split ( '\n' ) . slice ( 2 ) . join ( '\n' ) || '' ;
6867
6968 const logEvent : ConsoleLogEvent = {
7069 method,
7170 timestamp : new Date ( ) ,
7271 type : method ,
73- message : args
74- . map ( ( arg ) => typeof arg === 'string' ? arg : JSON . stringify ( arg ) ) . join ( ' ' ) ,
72+ message : args . map ( ( arg ) => typeof arg === 'string' ? arg : JSON . stringify ( arg ) ) . join ( ' ' ) ,
7573 stack,
7674 fileLine : stack . split ( '\n' ) [ 0 ] ?. trim ( ) ,
7775 } ;
@@ -84,6 +82,7 @@ const createConsoleCatcher = (): {
8482
8583 addErrorEvent ( event : ErrorEvent | PromiseRejectionEvent ) : void {
8684 const logEvent = createConsoleEventFromError ( event ) ;
85+
8786 addToConsoleOutput ( logEvent ) ;
8887 } ,
8988
@@ -94,5 +93,4 @@ const createConsoleCatcher = (): {
9493} ;
9594
9695const consoleCatcher = createConsoleCatcher ( ) ;
97- export const { initConsoleCatcher, getConsoleLogStack, addErrorEvent } =
98- consoleCatcher ;
96+ export const { initConsoleCatcher, getConsoleLogStack, addErrorEvent } = consoleCatcher ;
You can’t perform that action at this time.
0 commit comments