We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1419fc7 commit 6bbbd85Copy full SHA for 6bbbd85
server/api/registry/badge/[type]/[...pkg].get.ts
@@ -292,7 +292,7 @@ export default defineCachedEventHandler(
292
const rawLabelColor = labelColor ?? '#0a0a0a'
293
const finalLabelColor = rawLabelColor?.startsWith('#') ? rawLabelColor : `#${rawLabelColor}`
294
295
- const leftWidth = measureTextWidth(finalLabel)
+ const leftWidth = finalLabel.trim().length === 0 ? 0 : measureTextWidth(finalLabel)
296
const rightWidth = measureTextWidth(
297
finalValue,
298
CHARS_WIDTH[strategyKey as keyof typeof CHARS_WIDTH],
0 commit comments