fix scratch page render failure when parent scratch is unclaimed

This commit is contained in:
Alex Bates
2023-01-04 16:19:13 +00:00
parent 3bd4742878
commit ceac0a0b20

View File

@@ -10,7 +10,7 @@ export default async function Head({ params }: { params: { slug: string }}) {
if (scratch.owner)
description += `\nOwner: ${scratch.owner.username}`
if (parentScratch)
description += `\nForked from: @${parentScratch.owner.username}/${parentScratch.name}`
description += `\nForked from: @${parentScratch.owner?.username ?? "?"}/${parentScratch.name}`
if (scratch.description)
description += `\n\n${scratch.description}`