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 2377c31 commit 751f137Copy full SHA for 751f137
server/api/registry/badge/[type]/[...pkg].get.ts
@@ -374,7 +374,8 @@ const badgeStrategies = {
374
},
375
376
'types': async (pkgData: globalThis.Packument, requestedVersion?: string) => {
377
- const versionData = requestedVersion ? pkgData.versions?.[requestedVersion] : undefined
+ const targetVersion = requestedVersion ?? getLatestVersion(pkgData)
378
+ const versionData = targetVersion ? pkgData.versions?.[targetVersion] : undefined
379
380
if (versionData && hasBuiltInTypes(versionData)) {
381
return { label: 'types', value: 'included', color: COLORS.blue }
0 commit comments