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 33a2c90 commit b419292Copy full SHA for b419292
server/api/registry/badge/[type]/[...pkg].get.ts
@@ -374,8 +374,10 @@ const badgeStrategies = {
374
},
375
376
'types': async (pkgData: globalThis.Packument, requestedVersion?: string) => {
377
- if (hasBuiltInTypes(pkgData)) {
378
- return { label: 'types', value: 'included', color: COLORS.blue }
+ const versionData = requestedVersion ? pkgData.versions?.[requestedVersion] : undefined
+
379
+ if (versionData && hasBuiltInTypes(versionData)) {
380
+ return { label: 'types', value: 'included', color: COLORS.blue }
381
}
382
383
const { pkg, typesPackage, files } = await fetchPackageWithTypesAndFiles(
0 commit comments