diff --git a/components/workspace/use-cli-commands.tsx b/components/workspace/use-cli-commands.tsx index 2715b2e..a8310d9 100644 --- a/components/workspace/use-cli-commands.tsx +++ b/components/workspace/use-cli-commands.tsx @@ -305,8 +305,12 @@ function AuditReportResult({ codeHash }: { codeHash: string }) { "border-t-0": index !== 0, })} > -

Original: {i.Detail.Original}

-

Suggested: {i.Detail.Updated}

+ {i.Detail ? ( + <> +

Original: {i.Detail.Original}

+

Suggested: {i.Detail.Updated}

+ + ) : null} ))} diff --git a/data/audit.ts b/data/audit.ts index 6c4bd6c..14cb05f 100644 --- a/data/audit.ts +++ b/data/audit.ts @@ -67,7 +67,9 @@ const auditReportSchema = z.record( z.object({ Description: z.string(), Content: z.string(), - Detail: z.object({ Original: z.string(), Updated: z.string() }), + Detail: z + .object({ Original: z.string(), Updated: z.string() }) + .or(z.null()), }) ) );