We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15caf3a commit 80fbbc2Copy full SHA for 80fbbc2
server/services/fetchBadges.ts
@@ -88,7 +88,7 @@ function getBadgeUrl(
88
req: Request, item: { slug: string, type: string, data: string } | null,
89
): string {
90
// build url using request params and query
91
- const params = Object.values(req.params).map((p) => encodeURIComponent(p)).join('/');
+ const params = Object.values(req.params).map((p) => encodeURIComponent(p)).join('/') || 'badge/-test-blue';
92
const host = typeof req.query.host === 'string' ? req.query.host : 'img.shields.io';
93
if (!isValidHost(host)) {
94
throw new BadgeError('invalid host');
0 commit comments