File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ const createConsoleCatcher = (): {
3737 const formatConsoleArgs = (
3838 args : unknown [ ]
3939 ) : { message : string ; styles : string [ ] } => {
40- if ( args . length === 0 ) return { message : "" , styles : [ ] } ;
40+ if ( args . length === 0 ) return { message : '' , styles : [ ] } ;
4141
4242 const firstArg = args [ 0 ] ;
4343 if ( typeof firstArg !== 'string' || ! firstArg . includes ( '%c' ) ) {
@@ -56,8 +56,10 @@ const createConsoleCatcher = (): {
5656
5757 // Extract styles from arguments
5858 let styleIndex = 0 ;
59+
5960 for ( let i = 1 ; i < args . length ; i ++ ) {
6061 const arg = args [ i ] ;
62+
6163 if ( typeof arg === 'string' && message . indexOf ( '%c' , styleIndex ) !== - 1 ) {
6264 styles . push ( arg ) ;
6365 styleIndex = message . indexOf ( '%c' , styleIndex ) + 2 ;
You can’t perform that action at this time.
0 commit comments