fix: modpack content deleted from api breaks card (#7146)

This commit is contained in:
Calum H.
2026-08-14 15:41:34 +00:00
committed by GitHub
parent 3597bb4821
commit 74c672df49
4 changed files with 60 additions and 47 deletions
@@ -15,7 +15,7 @@ export type InstanceContentData = {
export type InstanceContentModpackData = {
project: ManagedContentProject
version: ManagedContentVersion
version: ManagedContentVersion | null
updateVersionId: string | null
}
@@ -53,10 +53,12 @@ function normalizeLinkedModpackInfo(
slug: modpackInfo.project.slug ?? modpackInfo.project.id,
icon_url: modpackInfo.project.icon_url ?? undefined,
},
version: {
...modpackInfo.version,
date_published: modpackInfo.version.date_published.toString(),
},
version: modpackInfo.version
? {
...modpackInfo.version,
date_published: modpackInfo.version.date_published.toString(),
}
: null,
updateVersionId: modpackInfo.update_version_id,
}
}