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 634ad20 commit a70083aCopy full SHA for a70083a
1 file changed
server/api/registry/badge/[type]/[...pkg].get.ts
@@ -69,7 +69,7 @@ function measureTextWidth(text: string, font: string): number | null {
69
70
const measuredWidth = context.measureText(text).width
71
72
- if (!Number.isNaN(measuredWidth)) {
+ if (Number.isFinite(measuredWidth) && measuredWidth > 0) {
73
return Math.ceil(measuredWidth)
74
}
75
0 commit comments