Skip to content

The Open Source DocuSign Alternative.

fix: handle older cert data

Mythiebfff1234bb76
diff --git a/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx b/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx
index d096d1a84..5b233e47b 100644
--- a/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx
+++ b/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx
@@ -230,10 +230,14 @@ export default async function SigningCertificate({ searchParams }: SigningCertif
<p className="text-muted-foreground text-sm print:text-xs">
<span className="font-medium">Sent:</span>{' '}
<span className="inline-block">
- <LocaleDate
- date={logs.EMAIL_SENT[0]?.createdAt}
- format="yyyy-MM-dd hh:mm:ss a (ZZZZ)"
- />
+ {logs.EMAIL_SENT[0] ? (
+ <LocaleDate
+ date={logs.EMAIL_SENT[0].createdAt}
+ format="yyyy-MM-dd hh:mm:ss a (ZZZZ)"
+ />
+ ) : (
+ 'Unknown'
+ )}
</span>
</p>