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,
}
}
+1 -1
View File
@@ -88,7 +88,7 @@ export async function refresh_content_updates(instanceId: string): Promise<void>
// Linked modpack info returned from backend
export interface LinkedModpackInfo {
project: Labrinth.Projects.v2.Project
version: Labrinth.Versions.v2.Version
version: Labrinth.Versions.v2.Version | null
owner: ContentOwner | null
has_update: boolean
update_version_id: string | null