Skip to content

Commit

Permalink
fix([email protected]): skip space on empty label
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Jun 6, 2024
1 parent c2e95db commit 79ab151
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion logs/logs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export class Console extends defineCallable(function log(...args){
}

_tag = (color, string) => {
return (string ? (chalk.inverse(color(bold(string))) + ' ') : '') + color(this.label)
const tag1 = (string ? (chalk.inverse(color(bold(string))) + (this.label ? ' ' : '')) : '')
const tag2 = (this.label ? color(this.label) : '')
return tag1 + tag2
}

get [Symbol.toStringTag]() {
Expand Down
2 changes: 1 addition & 1 deletion logs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hackbg/logs",
"version": "2.3.2",
"version": "2.3.3",
"main": "./logs.mjs",
"types": "./logs.d.ts",
"type": "module",
Expand Down

0 comments on commit 79ab151

Please sign in to comment.