Skip to content

Commit e891e26

Browse files
committed
fix: missing encodePackageName on fetch likes
1 parent 3526acf commit e891e26

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/composables/usePackageComparison.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ export function usePackageComparison(packageNames: MaybeRefOrGetter<string[]>) {
140140
$fetch<VulnerabilityTreeResult>(
141141
`/api/registry/vulnerabilities/${encodePackageName(name)}`,
142142
).catch(() => null),
143-
$fetch<PackageLikes>(`/api/social/likes/${name}`).catch(() => null),
143+
$fetch<PackageLikes>(`/api/social/likes/${encodePackageName(name)}`).catch(
144+
() => null,
145+
),
144146
])
145147
const versionData = pkgData.versions[latestVersion]
146148
const packageSize = versionData?.dist?.unpackedSize

0 commit comments

Comments
 (0)