Skip to content

Commit 3e0326a

Browse files
CopilotoBusk
andcommitted
Add validation for pack.time entries
Co-authored-by: oBusk <13413409+oBusk@users.noreply.github.com>
1 parent 017022c commit 3e0326a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/app/[...parts]/_page/catalog/CatalogPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ async function CatalogPageInner({ packageName }: CatalogPageProps) {
2121
// Extract version data from packument
2222
const versionMap: Record<string, { time: string }> = {};
2323
for (const [version] of Object.entries(pack.versions)) {
24-
versionMap[version] = { time: pack.time[version] };
24+
const time = pack.time[version];
25+
if (time) {
26+
versionMap[version] = { time };
27+
}
2528
}
2629

2730
// Get all versions

0 commit comments

Comments
 (0)