File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @grammyjs/debug" ,
3- "version" : " 0.3.0 " ,
3+ "version" : " 0.3.1 " ,
44 "exports" : " ./src/mod.ts" ,
55 "publish" : {
66 "exclude" : [
Original file line number Diff line number Diff line change @@ -54,12 +54,12 @@ export function createDebug(namespace: string): DebugFn {
5454
5555 const debugfn = ( ...data : unknown [ ] ) => {
5656 if ( ! debugfn . enabled ) return ;
57- const start = data . length ? data . shift ( ) : "" ;
57+ const format = typeof data [ 0 ] === "string" ? " " + data . shift ( ) : "" ;
5858 if ( useAnsi ) {
59- console . debug ( `${ ansiNamespace } ${ start } ` , ...data ) ;
59+ console . debug ( `${ ansiNamespace } ${ format } ` , ...data ) ;
6060 } else {
6161 console . debug (
62- `%c${ namespace } %c ${ start } ` ,
62+ `%c${ namespace } %c${ format } ` ,
6363 css ,
6464 "color: inherit" ,
6565 ...data ,
You can’t perform that action at this time.
0 commit comments